kykin Posted January 8, 2007 Share Posted January 8, 2007 I'm looking for a way to have two (or more) separate forms, each sending different data to my mysql database but doing so by clicking only one single "Submit" button at the bottom of the page.Elaboration:I have a text field, two radio buttons and four checkboxes (which represent miscellaneous options) for each result of a search query. because of this, there is really no way i can tell how many results i will get back. I want the user to be able to enter text, click and unclick boxes and buttons for each result, and then apply all those changes by clicking ONE submit button at the bottom (or top) of the page.I know this can be done, but i don't know if it requires javascripting. any help is greatly appreciated!~kykin Quote Link to comment https://forums.phpfreaks.com/topic/33327-multiple-forms-one-submit-buttonhow-do-i-do-this/ Share on other sites More sharing options...
Clarkey_Boy Posted January 8, 2007 Share Posted January 8, 2007 You should be able to do this using just one form, and one submit button... thats how I would do it.RC Quote Link to comment https://forums.phpfreaks.com/topic/33327-multiple-forms-one-submit-buttonhow-do-i-do-this/#findComment-155724 Share on other sites More sharing options...
kykin Posted January 8, 2007 Author Share Posted January 8, 2007 i thought about doing it with one form as well, but as it turned out, i couldnt modify all the contents of all the results with just one button...i would have to do one by one, and that's not user-friendly.let me use a real-world example:when you upload pictures to flickr.com, you browse for local files, upload your pictures and then they are displayed for you in thumbnail form. you can then title your picture, add a description, and add tags for each picture you uploaded as they are all displayed on one single page. then at the bottom of the page, you click the single big "SAVE" button, and all the data is passed along with its corresponding picture.i want to do something like that, but not with pictures, but search results. multiple forms, each corresponding to its own result, but one big "SUBMIT" button at the bottom. Quote Link to comment https://forums.phpfreaks.com/topic/33327-multiple-forms-one-submit-buttonhow-do-i-do-this/#findComment-155729 Share on other sites More sharing options...
Clarkey_Boy Posted January 8, 2007 Share Posted January 8, 2007 Now take another look at it, using Opera browser. Look at the source code. It may not show any serverside code but you can still see that it is one big form. I seriously dont think it is possible to take data from another form on submit.RC Quote Link to comment https://forums.phpfreaks.com/topic/33327-multiple-forms-one-submit-buttonhow-do-i-do-this/#findComment-155741 Share on other sites More sharing options...
Jessica Posted January 8, 2007 Share Posted January 8, 2007 I think for what you are talking about you'll need to use ajax.You're saying after the user enters some data, more information will appear which they can then edit, and THEN submit? Try mootools.net's ajax features. Quote Link to comment https://forums.phpfreaks.com/topic/33327-multiple-forms-one-submit-buttonhow-do-i-do-this/#findComment-155751 Share on other sites More sharing options...
kykin Posted January 8, 2007 Author Share Posted January 8, 2007 *sigh* AJAX.....why....ajax hates me.anyways, i didn't think that it was possible to submit multiple forms with just one button...but i suppose with a bit of java magic i could give it a try... perhaps i'll poke around the ajax board a bit before i move on to the mootools site. this ajax thing is rather intimidating to me..thanks for your help. i'm at least pointed in the right direction now.KK Quote Link to comment https://forums.phpfreaks.com/topic/33327-multiple-forms-one-submit-buttonhow-do-i-do-this/#findComment-155762 Share on other sites More sharing options...
Jessica Posted January 8, 2007 Share Posted January 8, 2007 Javascript != Java.Good luck. Quote Link to comment https://forums.phpfreaks.com/topic/33327-multiple-forms-one-submit-buttonhow-do-i-do-this/#findComment-155769 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.