gizmo
09-10-2003, 01:52 PM
This is simiar to another thread, however, for my first php program I am using a form starting with
<FORM action="feedback.php" method="post" enctype="text/plain">
and a typical line as
<TEXTAREA class="forms" name="address" cols="60" rows="4" wrap="virtual"> Enter your address here: </TEXTAREA>
There is a PHP file called, imaginatively, feedback.php which contains for example a line
$address=trim($address); which gives an error 'variable not defined'
and later another line
$mailcontent = "Address: ".$address."\n"
along with other similar things. Finally the line
mail($toaddress, $subject, $mailcontent, $fromaddress);
Now when the submit button is clicked the form is e-mailed ok and the php text 'Address: ' is sent ok but none of the variables have any content. What have I overlooked ?
<FORM action="feedback.php" method="post" enctype="text/plain">
and a typical line as
<TEXTAREA class="forms" name="address" cols="60" rows="4" wrap="virtual"> Enter your address here: </TEXTAREA>
There is a PHP file called, imaginatively, feedback.php which contains for example a line
$address=trim($address); which gives an error 'variable not defined'
and later another line
$mailcontent = "Address: ".$address."\n"
along with other similar things. Finally the line
mail($toaddress, $subject, $mailcontent, $fromaddress);
Now when the submit button is clicked the form is e-mailed ok and the php text 'Address: ' is sent ok but none of the variables have any content. What have I overlooked ?