I have a piece of code like the following
<?
$header =<<<EOT
header info
EOT;
$body = <<<EOT
body info
form ./cgi-bin/required.cgi #to add to sql dbase
submit button
EOT;
echo $header;
echo $body;
echo "";
$wf = fopen("/var/www/maillist.lst","r");
$ippost=fread($wf,15);
fclose($wf);
$ip = getenv("REMOTE_ADDR");
$posted_on = date('F d, Y g:i a');
$write = "$name" . "|" . "$time" . "|" . "$ip";
?>
my question is when $write inputs to file $wf it doesnt have name because it's not entered yet. how do I keep the form writing to my other cgi ./cgi-bin/required.cgi while having it write to $wf on submit?