/    Sign up×
Community /Pin to ProfileBookmark

PHP IF with multiple statements

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”);
}
[/code]

I’ve also tried :

[code=php]if($result) {
include(‘sendmail.php’);
header(“location: cal_login.php”);
exit();
}else {
die(“Query failed”);
}
[/code]

Thanks for the help in advance

to post a comment
PHP

0Be the first to comment 😎

×

Success!

Help @JKershner spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.13,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...