フォームで入力後、WEBに以下のような感じでフィルに書き出すんですが


if(open(FILE,">>hogehoge.log")) {

$record .= $in{'name'}."\t";
$record .= $in{'kana'}."\t";

                     jcode::convert(\$record,'sjis');

print OFILE $record;
close(OFILE);

 

 name が空白でないかを書き込み前にチェックしたいのですが、うまく動きません。

以下の記述を入れるかと思いますが、どの行に入れたら動作するでしょう?

if ($FORM{'name'} eq "") { &errexit("お名前は必ず入力してください"); }

以下のエラーが出ます。

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, [no address given] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

よろしくお願いします。<(_ _)>