dunn_cann Posted January 5, 2007 Share Posted January 5, 2007 Have just successfully completed my very first form and received the data via php (woo hoo!). But could someone please explain how i might now send that data (after it has been read) onto another email address/url. Thanks for any and all help! Link to comment https://forums.phpfreaks.com/topic/33021-form-data/ Share on other sites More sharing options...
ikmyer Posted January 5, 2007 Share Posted January 5, 2007 when you say received the data, where did you receive it ? posting some code would help too Link to comment https://forums.phpfreaks.com/topic/33021-form-data/#findComment-153790 Share on other sites More sharing options...
dunn_cann Posted January 5, 2007 Author Share Posted January 5, 2007 I used the following html to construct the form:[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>And i constructed the PHP Script as follows:<!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 // 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]Could someone tell me how i might include an address/url into the php script so as i could then be able to send the received data onto a colleague for example. Thanks for any and all help. Link to comment https://forums.phpfreaks.com/topic/33021-form-data/#findComment-153800 Share on other sites More sharing options...
kenrbnsn Posted January 5, 2007 Share Posted January 5, 2007 [b]Please[/b] modify your post and surround your code with [nobbc][code][/code][/nobbc] tags. Your code will be much more readable.Ken Link to comment https://forums.phpfreaks.com/topic/33021-form-data/#findComment-153805 Share on other sites More sharing options...
dunn_cann Posted January 5, 2007 Author Share Posted January 5, 2007 Hiya Ken have modified the post as requested. Link to comment https://forums.phpfreaks.com/topic/33021-form-data/#findComment-153813 Share on other sites More sharing options...
kenrbnsn Posted January 5, 2007 Share Posted January 5, 2007 No, you didn't. You used <code> & </code>, I asked you to use [nobbc][code] & [/code][/nobbc]Ken Link to comment https://forums.phpfreaks.com/topic/33021-form-data/#findComment-153816 Share on other sites More sharing options...
dunn_cann Posted January 5, 2007 Author Share Posted January 5, 2007 Howz that! yer highness Link to comment https://forums.phpfreaks.com/topic/33021-form-data/#findComment-153822 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.