ItsWesYo Posted July 31, 2006 Share Posted July 31, 2006 [b]contact.php[/b][code]<?phpinclude ("http://www.evermoreforums.com/wes/header.php");$page = ((isset($_REQUEST['page']))?($_REQUEST['page']):(''));switch($page){case "sent": { include ("http://www.evermoreforums.com/wes/contact2.php"); break; }default: { include ("http://www.evermoreforums.com/wes/contact1.php");break; }}?>[/code][b]contact1.php (the form)[/b][code]<center><table><tr><td><form method="POST" action="?page=sent"><b>1. Please select a type:</b><br><select name="type"><option value="comment">Comment<option value="error">Error<option value="other">Other<option value="quiz">Quiz<option value="suggest">Suggestion<option value="tutorial">Tutorial</select><br><br><b>2. Please enter the content:</b><br><textarea rows="7" cols="25" name="content"></textarea><br><br><input type="submit" value="Submit" name="submit"></form></td></tr></table></center>[/code][b]contact2.php (submits the form)[/b][code]<center><?phpif(isset($_POST['submit'])) {$to = "wes@evermore.com";$subject = "Contact Form";$type = $_POST['type'];$content = $_POST['content']; $body = "Type: $type \n\n Content: $content"; echo "Thanks! I'll get back to you soon.";mail($to, $subject, $body);} else {echo "It seems like there was an error with the form.";}?></center>[/code][b]The problem:[/b]Everytime I fill out the form and submit it ... it comes up with the error message. Quote Link to comment https://forums.phpfreaks.com/topic/16129-help-with-contact-form/ Share on other sites More sharing options...
ItsWesYo Posted July 31, 2006 Author Share Posted July 31, 2006 Sorry for the bump >_> Quote Link to comment https://forums.phpfreaks.com/topic/16129-help-with-contact-form/#findComment-66599 Share on other sites More sharing options...
sasa Posted July 31, 2006 Share Posted July 31, 2006 change [code]include ("http://www.evermoreforums.com/wes/contact2.php"); [/code]to[code]include ("contact2.php"); [/code] Quote Link to comment https://forums.phpfreaks.com/topic/16129-help-with-contact-form/#findComment-66613 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.