anujgarg Posted December 19, 2007 Share Posted December 19, 2007 hi is it possible to handle one form into another form? if yes, then I want to submit a form that is already in another form. let me elaborate more: i have 2 forms, say form1 and form2. I have 2 submit buttons in both forms named button1(under form1) and button2(under form2) respectively. Now, I want to submit form2 by clicking button2. Can I do that? The purpose of doing this is to insert the values of form2 controls/elements in the database. After inserting it in DB, I am retrieving an ID that will be inserted in DB after submitting form1. Any Suggestions.... TIA Anuj Quote Link to comment Share on other sites More sharing options...
rajivgonsalves Posted December 19, 2007 Share Posted December 19, 2007 You cannot have one form into another form.. they will have to be two seperate forms Quote Link to comment Share on other sites More sharing options...
anujgarg Posted December 19, 2007 Author Share Posted December 19, 2007 it means, there is no way to do so what I've thought with 2 forms in a single page. Quote Link to comment Share on other sites More sharing options...
JJohnsenDK Posted December 19, 2007 Share Posted December 19, 2007 you can have 2 forms on the same page just not 2 forms inside each ohter.... what you are requesting is done by updating the database with the first button and then pull out that infomation from the database to the ohter submit button... Quote Link to comment Share on other sites More sharing options...
redarrow Posted December 19, 2007 Share Posted December 19, 2007 what? dont get you sorry please exsplain more clearly cheers..... Quote Link to comment Share on other sites More sharing options...
adam291086 Posted December 19, 2007 Share Posted December 19, 2007 You will need two forms The first form will enter in the users information into the database Then is your second form you can query the databse for all the users information. Then display that in your form. Quote Link to comment Share on other sites More sharing options...
JJohnsenDK Posted December 19, 2007 Share Posted December 19, 2007 <?php if(submit){ update database $data = database query } ?> <form> <input submit> </form> <form> <input value="data" submit2> </form> Quote Link to comment Share on other sites More sharing options...
redarrow Posted December 19, 2007 Share Posted December 19, 2007 Why do you need to pull the users info back in a form please? Make's no sence becouse the user then can change the current pulled info.... or are you trying to get the info into another database table so the user can change the info....... I think it best you just tell the user the info overwise this get very messy... so in essance update both tables and tell the user the result of the other table... Quote Link to comment Share on other sites More sharing options...
rajivgonsalves Posted December 19, 2007 Share Posted December 19, 2007 why you need two forms just put one if your having similar data ? 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.