mike jongbloet
08-30-2006, 01:39 PM
Hello all,
Browsing the internet I came across this forum which looked very useful for the help I need. I'm coding a website with 2 forms on it. This is my php code from the more simple of the two.
Basically what i need it to do is take the info from the feedback form and send it to my mail. It also checks that fields ahve been filled in properly.
However, when I upload it and run it i get the error shown above (post title)
the code is below and the error is suposedly in Line 10. IO can't spot it so any help is greatly appreciated. Thanks.
<?
$name = $_REQUEST['name'] ;
$company = $_REQUEST['company'] ;
$email = $_REQUEST['email'] ;
$comments = $_REQUEST['comments'] ;
if (!isset($_REQUEST['email'])) {
header( "Location: http://www.mesh4safety.co.uk/cont_fbk.htm");
elseif (empty($email) || empty($name) || empty ($comments)) {
header( "Location: http://www.mesh4safety.co.uk/fbkerror.htm");
else {
mail( "kingcantona1999@yahoo.co.uk", "Feedback Form", $message, "From: $name");
header ("Location: http://www.mesh4safety.co.uk/fbkthankyou.htm");
?>
Browsing the internet I came across this forum which looked very useful for the help I need. I'm coding a website with 2 forms on it. This is my php code from the more simple of the two.
Basically what i need it to do is take the info from the feedback form and send it to my mail. It also checks that fields ahve been filled in properly.
However, when I upload it and run it i get the error shown above (post title)
the code is below and the error is suposedly in Line 10. IO can't spot it so any help is greatly appreciated. Thanks.
<?
$name = $_REQUEST['name'] ;
$company = $_REQUEST['company'] ;
$email = $_REQUEST['email'] ;
$comments = $_REQUEST['comments'] ;
if (!isset($_REQUEST['email'])) {
header( "Location: http://www.mesh4safety.co.uk/cont_fbk.htm");
elseif (empty($email) || empty($name) || empty ($comments)) {
header( "Location: http://www.mesh4safety.co.uk/fbkerror.htm");
else {
mail( "kingcantona1999@yahoo.co.uk", "Feedback Form", $message, "From: $name");
header ("Location: http://www.mesh4safety.co.uk/fbkthankyou.htm");
?>