mike0193 Posted January 14, 2009 Share Posted January 14, 2009 I want to create a site where information can be entered into a text field and then submitted to to a different page with the information that was submitted. Im new to php. Any scripts that will do this, or any ideas on how to learn how to do this, or whats this called? Link to comment https://forums.phpfreaks.com/topic/140761-question/ Share on other sites More sharing options...
cwarn23 Posted January 14, 2009 Share Posted January 14, 2009 If I am reading your question correctly then it seems more of a html question unless you want it to be resubmitted after submittion. So when the data is entered into the html form, if I understand correctly, you just want to redirect the user to a php page. Well place the following in the form tag: <form method='post' action='destination_page.php'> Your form fields in here </form> So the 'action=' section will redirect the user on submittion. Link to comment https://forums.phpfreaks.com/topic/140761-question/#findComment-736771 Share on other sites More sharing options...
anfo Posted January 14, 2009 Share Posted January 14, 2009 and on the page you redirect it to try this.... if(isset($_POST['submitted'])) { //do something echo '<p> data received</p>'; { else { echo '<p>Page not submitted</p>'; this bit of code tests whether the information has been sent to the new page or else it shows a message Page not submitted. the //do something is a comment but where you see the data received line this is where you do something with the information. Link to comment https://forums.phpfreaks.com/topic/140761-question/#findComment-736778 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.