PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Hi guys, I kind of got spoilt last time when you answered so quickly, so here I am again.
Is there any way of having a form in a page that runs some code "under" it rather than loading the same or another page?
In psudocode
if certain conditions arise {
form
input
submit
if submit, run the following code
}
else
do something else
ok almost perfect, but is there any way of running some code that is submitted by a form without having to reload the page?
its because i have quite a few variables and I don t want to have to dump everything in $_SESSION...
Thanks!!!
You need to reload the page because PHP is server side, the script can't run unless the server is called. Perhaps we can get a clearer picture if you show us some of the code or explain what variables would need to be passed. For example it may be possible to pass variables as hidden fields within the form.