[SOLVED] Sending Mail Using IF and ELSEIF
Moderator: General Moderators
Sending Mail Using IF and ELSEIF
I dunno why but my ELSEIFstatements arn't working - they're broken...!
If I use:
if ($AreasOfInterest01 == $VacancyCategory)
{
Send e-mail
}
It works fine. But If I add:
elseif ($AreasOfInterest02 == $VacancyCategory)
{
Send e-mail
}
It doesn't work if the entry is in AreasofInterest02.
I can declare and echo these variables fine so I know the strings are there but the code simply refuses to execute - and no errors...!
Any ideas guys...?
If I use:
if ($AreasOfInterest01 == $VacancyCategory)
{
Send e-mail
}
It works fine. But If I add:
elseif ($AreasOfInterest02 == $VacancyCategory)
{
Send e-mail
}
It doesn't work if the entry is in AreasofInterest02.
I can declare and echo these variables fine so I know the strings are there but the code simply refuses to execute - and no errors...!
Any ideas guys...?
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
post more code.
...and please use
...and please use
Code: Select all
tags when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url]No problem. Thanks very much for your time on this Jason.
I spent some time revisiting my code and found that although I was using a "WHILE" statement I had neglected to place the closing brace outside the IF statements.
This solved the problem.
Jason - Sorry to have wasted your time and thanks very much.
I spent some time revisiting my code and found that although I was using a "WHILE" statement I had neglected to place the closing brace outside the IF statements.
This solved the problem.
Jason - Sorry to have wasted your time and thanks very much.
Maybe because the e-mail notification came from: jason@phpcomplete.com