Dear friends,
Kindly look into this code below for me. I intend to use it to send my form data(not validated) to an email address. After I filled the form and running the code, it is the else echo statement ("Form not properly completed") that i keep recieving. However, I could not locate the problem. Please treat as urgent for me.
See code below:
<html>
<body><?php
if (isset($_POST['submit']))
{
$to = "quizentry@lagosschoolsonline.net";
$from = "quizentry@lagosschoolsonline.net";
$SchoolName = $_POST['SchoolName'] ;
$SchoolAddress = $_POST['SchoolAddress'] ;
$Locality = $_POST['Locality'] ;
$MobileNumber = $_POST['MobileNumber'] ;
$Landphone = $_POST['Landphone'] ;
$email = $_POST['email'] ;
$website = $_POST['website'] ;
$ContactPerson = $_POST['ContactPerson'] ;
$MarketerInCharge = $_POST['MarketerInCharge'] ;
$Username = $_POST['Username'] ;
$Password = $_POST['Password'] ;
// SECTION B//
$malecandidate = $_POST['malecandidate'] ;
$ddm = $_POST['ddm'] ;
$mmm = $_POST['mmm'] ;
$yym = $_POST['yym'] ;
$Refnumberm = $_POST['Refnumberm'] ;
//FEMALE//
$femalecandidate = $_POST['femalecandidate'] ;
$ddf = $_POST['ddf'] ;
$mmf = $_POST['mmf'] ;
$yyf = $_POST['yyf'] ;
$Refnumberf = $_POST['Refnumberf'] ;
//email address used//
if (mail($to,$SchoolName,$SchoolAddress,$Locality,$MobileNumber,$Landphone,$email,$website,$ContactPerson,$MarketerInCharge,$Username,$Password,$malecandidate,$ddm,$mmm,$yym,$Refnumberm,$femalecandidate,$ddf,$mmf,$yyf,$Refnumberf));
echo "Your entries have been submitted. Thank you." ;
}
else
echo "Form not properly completed"?>
</body>
</html>
Thank you.