I'm creating a form processor that checks to make sure that the recipient address is located at the same domain as the site.
$sitename = $_SERVER['HTTP_HOST'];
$sitename = ltrim($sitename, "www.");
$recipient = $_POST[recipient];
if ($recchk != $sitename){
echo "<h1>Illegal use of the form!</h1>";
}
I need to trim $recipient so that only the part of the string after the @ is left. How do I do it?
Brian