hello all, i will warn you before posting this that i am extremely new to this(i just started doing php yesterday haha) ive already learned how to send a form but now im trying to send a credit application with more variables(obviously). proble is, the darn thing wont send! HELP PLEASE 😕
Heres the code:
<?php
// Receiving variables
@$pfw_ip= $SERVER['REMOTE_ADDR'];
@$ip3 = addslashes($POST['ip3']);
@$httpref3 = addslashes($POST['httpref3']);
@$httpagent3 = addslashes($POST['httpagent3']);
@$fname = addslashes($POST['fname']);
@$lname = addslashes($POST['lname']);
@$minitial = addslashes($POST['minitial']);
@$dob = addslashes($POST['dob']);
@$email = addslashes($POST['email']);
@$sin = addslashes($POST['sin']);
@$single = addslashes($POST['single']);
@$married = addslashes($POST['married']);
@$cadd = addslashes($POST['cadd']);
@$own = addslashes($POST['own']);
@$rent = addslashes($POST['rent']);
@$other = addslashes($POST['other']);
@$ycadd = addslashes($POST['ycadd']);
@$city = addslashes($POST['city']);
@$prov = addslashes($POST['prov']);
@$phnum = addslashes($POST['phnum']);
@$pcode = addslashes($POST['pcode']);
@$mbal = addslashes($POST['mbal']);
@$mpay = addslashes($POST['mpay']);
@$finst = addslashes($POST['finst']);
@$cval = addslashes($POST['cval']);
@$pradd = addslashes($POST['pradd']);
@$prevycadd = addslashes($POST['prevycadd']);
@$prcity = addslashes($POST['prcity']);
@$prprov = addslashes($POST['prprov']);
@$prpcode = addslashes($POST['prpcode']);
@$empname = addslashes($POST['empname']);
@$empincome = addslashes($POST['empincome']);
@$empmonth = addslashes($POST['empmonth']);
@$empbiweek = addslashes($POST['empbiweek']);
@$empweek = addslashes($POST['empweek']);
@$empadd = addslashes($POST['empadd']);
@$empocc = addslashes($POST['empocc']);
@$empphone = addslashes($POST['empphone']);
@$empyrs = addslashes($POST['empyrs']);
@$prempname = addslashes($POST['prempname']);
@$prempincome = addslashes($POST['prempincome']);
@$prempmonth = addslashes($POST['prempmonth']);
@$prempbiweek = addslashes($POST['prempbiweek']);
@$prempweek = addslashes($POST['prempweek']);
@$prempadd = addslashes($POST['prempadd']);
@$prempocc = addslashes($POST['prempocc']);
@$prempphone = addslashes($POST['prempphone']);
@$prempyrs = addslashes($POST['prempyrs']);
@$cofname = addslashes($POST['cofname']);
@$colname = addslashes($POST['colname']);
@$cominitial = addslashes($POST['cominitial']);
@$codob = addslashes($POST['codob']);
@$coemail = addslashes($POST['coemail']);
@$cosin = addslashes($POST['cosin']);
@$cosingle = addslashes($POST['cosingle']);
@$comarried = addslashes($POST['comarried']);
@$cocadd = addslashes($POST['cocadd']);
@$coown = addslashes($POST['coown']);
@$corent = addslashes($POST['corent']);
@$coother = addslashes($POST['coother']);
@$coycadd = addslashes($POST['coycadd']);
@$cocity = addslashes($POST['cocity']);
@$coprov = addslashes($POST['coprov']);
@$cophnum = addslashes($POST['cophnum']);
@$copcode = addslashes($POST['copcode']);
@$combal = addslashes($POST['combal']);
@$compay = addslashes($POST['compay']);
@$cofinst = addslashes($POST['cofinst']);
@$cocval = addslashes($POST['cocval']);
@$copradd = addslashes($POST['copradd']);
@$coprevycadd = addslashes($POST['coprevycadd']);
@$coprcity = addslashes($POST['coprcity']);
@$coprprov = addslashes($POST['coprprov']);
@$coprpcode = addslashes($POST['coprpcode']);
@$coempname = addslashes($POST['coempname']);
@$coempincome = addslashes($POST['coempincome']);
@$coempmonth = addslashes($POST['coempmonth']);
@$coempbiweek = addslashes($POST['coempbiweek']);
@$coempweek = addslashes($POST['coempweek']);
@$coempadd = addslashes($POST['coempadd']);
@$coempocc = addslashes($POST['coempocc']);
@$coempphone = addslashes($POST['coempphone']);
@$coempyrs = addslashes($POST['coempyrs']);
@$coprempname = addslashes($POST['coprempname']);
@$coprempincome = addslashes($POST['coprempincome']);
@$coprempmonth = addslashes($POST['coprempmonth']);
@$coprempbiweek = addslashes($POST['coprempbiweek']);
@$coprempweek = addslashes($POST['coprempweek']);
@$coprempadd = addslashes($POST['coprempadd']);
@$coprempocc = addslashes($POST['coprempocc']);
@$coprempphone = addslashes($POST['coprempphone']);
@$coprempyrs = addslashes($POST['coprempyrs']);
// Validation
if (strlen($fname) <=0)
{
die("<p align='center'><font face='Arial' size='3' color='#FF0000'>Please enter a valid fname</font></p>");
}
if (strlen($fname) == 0 )
{
die("<p align='center'><font face='Arial' size='3' color='#FF0000'>Please enter a valid fname</font></p>");
}
if (strlen($lname) <=0)
{
die("<p align='center'><font face='Arial' size='3' color='#FF0000'>Please enter a valid lname</font></p>");
}
if (strlen($lname) == 0 )
{
die("<p align='center'><font face='Arial' size='3' color='#FF0000'>Please enter a valid lname</font></p>");
}
if (strlen($minitial) <=0)
{
die("<p align='center'><font face='Arial' size='3' color='#FF0000'>Please enter a valid minitial</font></p>");
}
if (strlen($minitial) == 0 )
{
die("<p align='center'><font face='Arial' size='3' color='#FF0000'>Please enter a valid minitial</font></p>");
}
if (strlen($dob) !=8)
{
die("<p align='center'><font face='Arial' size='3' color='#FF0000'>Please enter a valid dob</font></p>");
}
if (strlen($dob) == 0 )
{
die("<p align='center'><font face='Arial' size='3' color='#FF0000'>Please enter a valid dob</font></p>");
}
if (strlen($email) <=0)
{
die("<p align='center'><font face='Arial' size='3' color='#FF0000'>Please enter a valid email</font></p>");
}
if (strlen($email) == 0 )
{
die("<p align='center'><font face='Arial' size='3' color='#FF0000'>Please enter a valid email</font></p>");
}
if (strlen($sin) !=9)
{
die("<p align='center'><font face='Arial' size='3' color='#FF0000'>Please enter a valid sin</font></p>");
}
if (strlen($cadd) == 0 )
{
die("<p align='center'><font face='Arial' size='3' color='#FF0000'>Please enter a valid cadd</font></p>");
}
if (strlen($ycadd) == 0 )
{
die("<p align='center'><font face='Arial' size='3' color='#FF0000'>Please enter a valid ycadd</font></p>");
}
//Sending Email to form owner
$pfw_header = "From: $fname\n"
. "Reply-To: $fname\n";
$pfw_subject = "Credit Application";
$pfw_email_to = "dweeres@hotmail.com";
$pfw_message = "Visitor's IP: $pfw_ip\n"
. "fname: $fname\n"
. "lname: $lname\n"
. "minitial: $minitial\n"
. "dob: $dob\n"
. "email: $email\n"
. "sin: $sin\n"
. "single: $single\n"
. "married: $married\n"
. "cadd: $cadd\n"
. "own: $own\n"
. "rent: $rent\n"
. "other: $other\n"
. "ycadd: $ycadd\n"
. "city: $city\n"
. "prov: $prov\n"
. "phnum: $phnum\n"
. "pcode: $pcode\n"
. "mbal: $mbal\n"
. "mpay: $mpay\n"
. "finst: $finst\n"
. "cval: $cval\n"
. "pradd: $pradd\n"
. "prevycadd: $prevycadd\n"
. "prcity: $prcity\n"
. "prprov: $prprov\n"
. "prpcode: $prpcode\n"
. "empname: $empname\n"
. "empincome: $empincome\n"
. "empmonth: $empmonth\n"
. "empbiweek: $empbiweek\n"
. "empweek: $empweek\n"
. "empadd: $empadd\n"
. "empocc: $empocc\n"
. "empphone: $empphone\n"
. "empyrs: $empyrs\n"
. "prempname: $prempname\n"
. "prempincome: $prempincome\n"
. "prempmonth: $prempmonth\n"
. "prempbiweek: $prempbiweek\n"
. "prempweek: $prempweek\n"
. "prempadd: $prempadd\n"
. "prempocc: $prempocc\n"
. "prempphone: $prempphone\n"
. "prempyrs: $prempyrs\n"
. "cofname: $cofname\n"
. "colname: $colname\n"
. "cominitial: $cominitial\n"
. "codob: $codob\n"
. "coemail: $coemail\n"
. "cosin: $cosin\n"
. "cosingle: $cosingle\n"
. "comarried: $comarried\n"
. "cocadd: $cocadd\n"
. "coown: $coown\n"
. "corent: $corent\n"
. "coother: $coother\n"
. "coycadd: $coycadd\n"
. "cocity: $cocity\n"
. "coprov: $coprov\n"
. "cophnum: $cophnum\n"
. "copcode: $copcode\n"
. "combal: $combal\n"
. "compay: $compay\n"
. "cofinst: $cofinst\n"
. "cocval: $cocval\n"
. "copradd: $copradd\n"
. "coprevycadd: $coprevycadd\n"
. "coprcity: $coprcity\n"
. "coprprov: $coprprov\n"
. "coprpcode: $coprpcode\n"
. "coempname: $coempname\n"
. "coempincome: $coempincome\n"
. "coempmonth: $coempmonth\n"
. "coempbiweek: $coempbiweek\n"
. "coempweek: $coempweek\n"
. "coempadd: $coempadd\n"
. "coempocc: $coempocc\n"
. "coempphone: $coempphone\n"
. "coempyrs: $coempyrs\n"
. "coprempname: $coprempname\n"
. "coprempincome: $coprempincome\n"
. "coprempmonth: $coprempmonth\n"
. "coprempbiweek: $coprempbiweek\n"
. "coprempweek: $coprempweek\n"
. "coprempadd: $coprempadd\n"
. "coprempocc: $coprempocc\n"
. "coprempphone: $coprempphone\n"
. "coprempyrs: $coprempyrs\n";
else {mail("dweeres@hotmail.com", $pfw_subject ,$pfw_message ,$pfw_header ) ;
echo("<p align='center'><font face='Arial' size='3' color='#FF0000'>Thank you for your application</font></p>");
}
?>
thanks@