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? Quote Link to comment 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. Quote Link to comment 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. Quote Link to comment 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.