I’m have a little experience with PHP but I’m a little stuck. I’m taking a registration script where if registration is successful then email confirmation and redirect to login page. I’ve tried a number of variations of code and don’t believe an IF/ELSE is correct
[code=php]
if($result) {
$mailrecpt = $MAILCFG[1] ;
if (($MAILCFG[0]==1)||($MAILCFG[2]==1)) {
$mailhead = “Registration Confirmed”;
$body =”Thank you $name for registering
Your username is: $login
Your password is: $password
If you have any questions concerning your appointments or need to contact us.
Please email us at [email][email protected][/email] or call us at (208)830-0039.
You can also log into your account and change your appointment by selecting the desired appointment and click ‘Edit Event’.
I Knead You Deep Tissue Massage
Address: 1889 Wildwood St.
Boise, ID 83713-5146
Hrs: 11am – 5pm
Closed: Sundays
Email: [email][email protected][/email]”;
mail($mailrecpt, “Registration Confirmed”,$body,
“From: Rachele Kershner <[email protected]>rn”
//.”Reply-To: [email][email protected][/email]rn”
.”Bcc: $email”);
}
//include(‘sendmail.php’);
header(“location: cal_login.php”);
exit();
}else {
die(“Query failed”);
}
I’ve also tried :
[code=php]if($result) {
include(‘sendmail.php’);
header(“location: cal_login.php”);
exit();
}else {
die(“Query failed”);
}
Thanks for the help in advance