cljones81 Posted March 14, 2008 Share Posted March 14, 2008 Hi Everyone: I was just wondering if it would be possible to pass variables between forms on the same page, for instance, if I were to select a table from a listbox/combobox would it then be possible for this information to be passed to the next form on the same page, which would have a listbox/combobox which will contain the field names of the previously selected table, code which I have already written thanks helpful respondents on a previous posting of mine. I just think this would be a fair neater way than using buttons to pass variable between forms but I've not quite worked out how to do it and cannot find any suitable tutorials that deal with this, just passing variables between pages. So if anybody knows of any tutorials and have the URL to hand or can provide any helpful hint how to accomplish this, it will be appreciated. Christian Link to comment https://forums.phpfreaks.com/topic/96150-passing-variables-between-forms-on-the-same-page/ Share on other sites More sharing options...
johnska7 Posted March 14, 2008 Share Posted March 14, 2008 You would have to look into a javascript solution, as PHP can only pass variables when a page is submitted to the server. Link to comment https://forums.phpfreaks.com/topic/96150-passing-variables-between-forms-on-the-same-page/#findComment-492201 Share on other sites More sharing options...
craygo Posted March 14, 2008 Share Posted March 14, 2008 Yes you would have to select your option in the dropdown box and submit it, then the variables will be able to be shown on the next form. You can use the same page just use a switch or if/then to see which part of the form has been submitted. Ray Link to comment https://forums.phpfreaks.com/topic/96150-passing-variables-between-forms-on-the-same-page/#findComment-492202 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.