hey guys,
trying to create a php script to handle data from a webform
simple mailing list
I have all setup so it will catch and email me the input etc.
now all i need to do is setup error checking
Ie If someone enteres something without an @ or invalid character etc it says hey you cholo...wrong!
etc
I have set this up for testing purposes
if ($email == "bah")
{
Print("<font color=#FFFFFF><p align=center>"."Thank you for joining the Faction 306 Mailing List"."</font>"."<br>");
Print("<font color=#FFFFFF><p align=center>"."An email has now been sent to ".$email."</font>");
mail($sendto, $subject, $message, $headers);
}
else
{
Print("<font color=#FFFFFF><p align=center>"."Sorry the Email address you entered was not valid please click the back button and try again"."</font>");
}
ok so at the moment it works depending on if I enter bah or something else..
what i want it to do is see if theres an @ symbol in the text and perhaps even a .ext
which means it is something in the line
if ($email == "bah")
just not sure how to do it...yet
any help appreciated
rock on
vamps