dunn_cann Posted January 6, 2007 Share Posted January 6, 2007 Could someone please help me out here? I have been trying to include an email address/url into a form so that i could if wanted send the results of the form to a colleague for example. Thanks all.HTML Code:[code]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="content-type" content="text/html; charset=iso-8859-1"><title>Feedback Form</title></head><body><u>Please complete this form to submit your feedback:</u> <br /><form action="handle_form.php" method="POST">Mr. <input type="radio" name="title" value="Mr." />Mrs. <input type="radio" name="title" value="Mrs." />Ms. <input type="radio" name="title" value="Ms." /><br />Name: <input type="text" name="name" size="20" /><br />Email Address: <input type="text" name="email" size="20" /><br />Response: <select name="response"><option value="excellent">This is excellent.</option><option value="okay">This is okay.</option><option value="boring">This is boring.</option></select><br />Comments: <textarea name="comments" rows="3" cols="30"></textarea><br /><input type="submit" name="submit" value="Send My Feedback" /></form><!-- Feedback.html --></body></html>PHP Code:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="content-type" content="text/html; charset=iso-8859-1"><title>Practice Page</title></head><body><?php // Script 3.4 - handle_form.phpini_set ('display_errors',1); // Let me learn from my mistakes.// This page receives the data from feedback.html.// It will receive: title, name, email, response, comments, and submit.print "Thank you {$_POST['title']} {$_POST['name']} for your comments. <br />";print "You stated that you found this example to be {$_POST['response']} and added: {$_POST['comments']}";?> </body></html>[/code] Quote Link to comment https://forums.phpfreaks.com/topic/33139-adding-email-address-into-a-form/ Share on other sites More sharing options...
Jessica Posted January 6, 2007 Share Posted January 6, 2007 look up mail(); Quote Link to comment https://forums.phpfreaks.com/topic/33139-adding-email-address-into-a-form/#findComment-154397 Share on other sites More sharing options...
dunn_cann Posted January 6, 2007 Author Share Posted January 6, 2007 Ok and thanks for the reply Jesirose. Quote Link to comment https://forums.phpfreaks.com/topic/33139-adding-email-address-into-a-form/#findComment-154401 Share on other sites More sharing options...
dunn_cann Posted January 6, 2007 Author Share Posted January 6, 2007 For some reason i keep making a mess of things couldn't someone help me out here please Quote Link to comment https://forums.phpfreaks.com/topic/33139-adding-email-address-into-a-form/#findComment-154429 Share on other sites More sharing options...
ToonMariner Posted January 6, 2007 Share Posted January 6, 2007 if you read the manual for teh mail function that jessie gave you a link to you should get a good starting point. People on here will HELP you not do it for you.Tell us what you have messed up, post some error messages or something then we can HELP. Quote Link to comment https://forums.phpfreaks.com/topic/33139-adding-email-address-into-a-form/#findComment-154432 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.