next Posted December 30, 2012 Share Posted December 30, 2012 How do I submit forms in associative array format to PHP? Here's what I have so far: function submitSettings() { $('.forms').each(function() { $(this).serializeArray(); }); } looks like serialize creates assoc. array just like I need, but I don't understand how to pass the data to PHP. Can anyone help? Quote Link to comment https://forums.phpfreaks.com/topic/272507-submit-multiple-forms-at-once/ Share on other sites More sharing options...
Jessica Posted December 30, 2012 Share Posted December 30, 2012 Ajax! Quote Link to comment https://forums.phpfreaks.com/topic/272507-submit-multiple-forms-at-once/#findComment-1402102 Share on other sites More sharing options...
codefossa Posted December 30, 2012 Share Posted December 30, 2012 (edited) $.post('page.php', $(this).serialize()); Remember if you're using a submit button to do it, you need to return false or else you'll follow it. Edited December 30, 2012 by Xaotique Quote Link to comment https://forums.phpfreaks.com/topic/272507-submit-multiple-forms-at-once/#findComment-1402107 Share on other sites More sharing options...
next Posted December 30, 2012 Author Share Posted December 30, 2012 Thanks. Now if I could only figure out how to get this to work in OpenCart Quote Link to comment https://forums.phpfreaks.com/topic/272507-submit-multiple-forms-at-once/#findComment-1402119 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.