GAstrada
Programmer
- Sep 20, 2000
- 97
I know that I'm breaking the forum's rules: Look carefully in a Google's search, find a thread in this forum, and so.. before sending a question,...forguive me..
But I'm urgent to have to know:
How can I call a php script (who must perform a query in a MySql database, and change fields), from any button from an html form?........ any button that isn't a SUBMIT button, as defined in the "action" of the form.
Thats said <input type=BUTTON OnClick .....(something) >
... so, this button calls OTHER php's script, not the defined in the "action" form.
The OnClick is my headache...
I know that php runs from the server's side, and Javascript and html runs from the client's browser side.
It's impossible for html to do this. But with Javascript maybe there is a way to do this..
The sequence must be:
1. The client fills a main.html form and have many buttons to press, only one is submit (at least I think that)
2. If pressed the submit button, the program continue as it was made.
3. If pressed another button, some php's script ended with a (not pretty, but works: header("Location:main.html"); shoud make field changes in the Mysql table, and the program shuld came back to MAIN.HTML.
Tanks all, in advance!!!!
But I'm urgent to have to know:
How can I call a php script (who must perform a query in a MySql database, and change fields), from any button from an html form?........ any button that isn't a SUBMIT button, as defined in the "action" of the form.
Thats said <input type=BUTTON OnClick .....(something) >
... so, this button calls OTHER php's script, not the defined in the "action" form.
The OnClick is my headache...
I know that php runs from the server's side, and Javascript and html runs from the client's browser side.
It's impossible for html to do this. But with Javascript maybe there is a way to do this..
The sequence must be:
1. The client fills a main.html form and have many buttons to press, only one is submit (at least I think that)
2. If pressed the submit button, the program continue as it was made.
3. If pressed another button, some php's script ended with a (not pretty, but works: header("Location:main.html"); shoud make field changes in the Mysql table, and the program shuld came back to MAIN.HTML.
Tanks all, in advance!!!!