Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

else if statement ...run two commands as opposed to one

Status
Not open for further replies.

tippytarka

Programmer
Jul 19, 2004
115
GB
hi there,

as you can see i'm trying to execute two commands if '$to_count > 100' is true ....but i'm having some difficulty trying to make it happen. can anyone help??


if ($to_count < 100) {
echo "Sorry, your counts are too low";
} else if ($to_count > 100) {
$send = mail($to, $subject, $message, $headers);
return $send;
echo "Your results have been sent to your email address where you will receive
instruction to continue with your order";
}


cheers!
 
the return $send; statement stops execution of your script and exits (or finishes the function it's in).

if you move it to after the echo it should work and then terminate the function.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top