coldfiretech Posted August 22, 2008 Share Posted August 22, 2008 Im having some problems with this invite form.. i keep getting this error Fatal error: Call to undefined function: filter_var() in /home/cellsav/public_html/invite.php on line 6 here is the code <?php function spamcheck() { $invite = $_POST['iemail']; if(filter_var($invite, FILTER_VALIDATE_EMAIL)) { return TRUE; } else { return FALSE; } } // end of function if (isset($_REQUEST['iemail'])) { $mailcheck = spamcheck(); if ($mailcheck==FALSE) { echo "Invalid input"; } else {//send email $email = $_REQUEST['iemail'] ; $subject = $_REQUEST["You've been invited to Cell Savior!"] ; $message = $_REQUEST['message'] ; mail($email, "Subject: $subject", $message, "From: Cell Savior" ); echo "Thank you for using our invite system!"; } } else //redirect back to contact form echo "Please enter an email address in the form before submitting."; ?> Quote Link to comment Share on other sites More sharing options...
JasonLewis Posted August 22, 2008 Share Posted August 22, 2008 Make sure that your running the latest available version of PHP. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.