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!
I am creating a php program with an HTML integration. Within my HTML code, I called two buttons... my question is, how can I call two different actions or page using a single form? Is this correct?
if the user than clicks on the add button, you will have $_POST['action'] == 'add'. And if he clicks on the search button, $_POST['action'] will equal 'search'
Does that mean that my form would look like this--> <form method="POST"> Since my two buttons will lead to a different page and placing a certain page on the action might become confusing?
but if you don't want to use javascript and you want to preform two actions with one button form, use some php function to pass information to another page.. for example...