Hi, php newbie here, web developer newbie too!
Some time ago I did a website which included a course registration form which someone else created for me in php. This worked fine and I amended the original to work on another website. I am currently updating this second website and the php has stopped working, and I am no longer in contact with the original developer of the code.
The form is at: http://www.bisntechnologies.com/register.htm, and the php is:
<?php
/* ------- Stuff You Can Change --------- */
$recipient = 'registration@bisntechnologies.com';
$redirect = 'confirmation.php';
/* -------------------------------------- */
$name = $HTTP_POST_VARS['name'];
$company = $HTTP_POST_VARS['company'];
$position = $HTTP_POST_VARS['position'];
$telephone = $HTTP_POST_VARS['telephone'];
$email = $HTTP_POST_VARS['email'];
$interest = $HTTP_POST_VARS['interest'];
$clientip = $_SERVER['REMOTE_ADDR'];
$msg = "Name: $name\nCompany: $company\nPosition: $position\nTelephone: $telephone\nE-mail: $email\nInterest: $interest\n\nIP Address: $clientip";
$replymsg = "<html><body style=\"font-family: Trebuchet MS; font-size: 13px\"><p>Dear $name,</p><p>Thank you for registering.</p><p><a href=\"http://www.bisntechnologies.com\"><img border=0 src=\"http://www.bisntechnologies.com/images/NewLogo.jpg\" alt=\"BiSN Technologies Ltd\"></a></p></body></html>";
if (mail($email,'Registration',$replymsg,"MIME-Version: 1.0\r\nContent-type: text/html;charset=iso-8859-1\r\nFrom: registration@bisntechnologies.com")) {
mail($recipient,'Registration Confirmation',$msg,"From: $email");
include($redirect);
} else {
echo "<h4>\"$email\" is an invalid e-mail address. Please click the browser's Back button.</h4>";
}
?>
Putting in valid information gives the error: "" is an invalid e-mail address. Please click the browser's Back button." which it didn't used to do. I expect it is a very simple mistake but I cannot trace it.
Any help to pinpoint the problem greatly appreciated.
[attachment deleted by admin]