Hey, I’m just wondering if it’s possible to have a form in html do two things on submit, have the action go to a url like normal (for a search) but also run a mysql command.
Thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
A form can not run any SQL. HTML has nothing to do with databases, it doesn’t know about them, it can’t talk to them.
A script on your server can do SQL queries, and that script can be invoked by the browser request. The browser may also submit form data together with the request if it wishes.
It works like this: