Xenia Posted January 24, 2006 Share Posted January 24, 2006 Hi,I have created a form where the user has to fill in 4 field(site.php). When the user clicks on the submit button,he/she redirected in another form(check.php) which displays the data that the user has put in the previous form.The current form has two buttons,the submit(insert the data into the database)and the change. The change returns back to the previous form(site.php) in order the user to change what he/she has put.I want the form(site.php) to keep the data when the user click the change button.Please can anyone help me, any suggestion because it is important?Thank you in advance,Xenia Link to comment Share on other sites More sharing options...
Xenia Posted January 24, 2006 Author Share Posted January 24, 2006 Hi,I have created a form where the user has to fill in 4 field(site.php). When the user clicks on the submit button,he/she redirected in another form(check.php) which displays the data that the user has put in the previous form.The current form has two buttons,the submit(insert the data into the database)and the change. The change returns back to the previous form(site.php) in order the user to change what he/she has put.I want the form(site.php) to keep the data when the user click the change button.Please can anyone help me, any suggestion because it is important?Thank you in advance,Xenia<{POST_SNAPBACK}> Do you think that if i was displayed the code this would help,as i have seen many users are visiting my question but no one reply.Thanks,Xenia Link to comment Share on other sites More sharing options...
real_illusions Posted January 24, 2006 Share Posted January 24, 2006 it is possible, using php, to write out whats been written on the form, onto the next page. <p>Thank you <?phpecho $_POST["name"];?>.</p> if the user puts in their name as "small green giraffe"then, when the user presses submit, it takes them to the next page where it says"Thanks you small green giraffe"if you want it in a form, you can put in a predefined value in the text area, however, i dont know if it will accept php code in an attribute. Link to comment Share on other sites More sharing options...
Xenia Posted January 24, 2006 Author Share Posted January 24, 2006 it is possible, using php, to write out whats been written on the form, onto the next page. <p>Thank you <?phpecho $_POST["name"];?>.</p> if the user puts in their name as "small green giraffe"then, when the user presses submit, it takes them to the next page where it says"Thanks you small green giraffe"if you want it in a form, you can put in a predefined value in the text area, however, i dont know if it will accept php code in an attribute. <{POST_SNAPBACK}> This is the form site.php<html><?$mgr=$_POST['sitemgr'];$const=$_POST['construction'];$location=$_POST['location'];$info=$_POST['info'];?><body><br><table width="100%" border="1"><tr><td><form action="check.php" method="POST" name="csite" > <table width="100%" border="0" align="center" > <tr> <td>Site mgr</td> <td> <input type="text" name="sitemgr"></td> </tr> <tr> <td>Construction Co</td> <td><input type="text" name="construction"></td> </tr> <tr> <td>Location</td> <td><input type="text" name="location"></td> </tr> <tr> <td>Other information</td> <td><input type="text" name="info"></td> </tr> <tr> <table align="center"> <tr> <td><input type="submit" value="Submit" name="submit"></td> <td><input type="reset" value="Clear"></td> </tr> </tr> </form> </table></td></tr></table></body></html>This form by clicking the submit redirect to the following form check.php<?$mgr=$_POST['sitemgr'];$const=$_POST['construction'];$location=$_POST['location'];$info=$_POST['info'];?><html><body><br><table width="100%" border="1" > <tr> <td> <form name="changeCSite" method="POST" action="CSite.php" > <table width="100%" border="1" aligh="center"> <tr> <td>Site mgr</td> <td><? echo $_REQUEST['sitemgr'];?> </td> </tr> <tr> <td>Construction Co</td> <td><? echo $_REQUEST ['construction'];?></td> </tr> <td>Location</td> <td><? echo $_REQUEST['location'];?></td> </tr> <tr> <td>Other information</td> <td><? echo $_REQUEST['info'];?></td> </tr> <tr> <td></td> <td><input type="submit" value="Change" name="change"</form> </table> </form> </td> </tr></table></body></html>This is the code for the two forms,i hope this can help and suggest a solution.Thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now