kopusx Posted April 14, 2007 Share Posted April 14, 2007 Ok this is the code I have so far, but it does not work and i am not sure where is my error what I have is a form that has name, email address, and message, this then is taken when they click the send mail button. can anyone tell me why it does not work? <?phpif (empty($name) || empty($subject) || empty($text)) $email = false; else $email = 'admin@cool.com';}@extract($_POST);$name = stripslashes($name);$subject = stripslashes($subject);$text = stripslashes($text);mail('admin@cool.com',$subject,$text,"From: $name <$email>");header("location:contactanos.php");if (empty($name) || empty($subject) || empty($text)) { header("location:incomplete.php"); } else { header( "Location:complete.php" ); }?> Quote Link to comment https://forums.phpfreaks.com/topic/46944-i-need-some-help-creating-a-send-mail-php-script/ Share on other sites More sharing options...
MadTechie Posted April 14, 2007 Share Posted April 14, 2007 Wow thats a real mess are you setting $name $subject $text anywhere i think were missing some code Quote Link to comment https://forums.phpfreaks.com/topic/46944-i-need-some-help-creating-a-send-mail-php-script/#findComment-228923 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.