I have a website with a contact form, when I submit the details I get an error message about deprecated eregi() on line. This is the block of code that seems to be having a problem. I don't know php, so could anyone give a hand?
if (email_is_valid($youremail) && !eregi("\r",$youremail) && !eregi("\n",$youremail) && $yourname != "" && $yourmessage != "" && substr(md5($user_answer),5,10) === $answer) {
mail($to,$subject,$message,$headers);
$yourname = '';
$youremail = '';
$yourmessage = '';
echo '<p style="color: #200041; text-align: center;">'.$contact_submitted.'</p>';
}
eregiis very deprecated since the PHP 5.3.0. Usemb_eragi()instead