I am working in PHP and Mysql Combo
I need to search the results from DB and store in a hidden field , on change of the value user inserts in a text box.
How can I do this Using Ajax?
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.
You will need a few things:
I’d recommend using jQuery for the ajax though you could always roll your own if you’re a masochist.
On your main page you will need something like this:
Edit: Here’s an idea of what returnsearchresults.php should look like:
Note: I haven’t included code to open/close the database connection or to verify that $_GET[‘q’] isn’t malicious. I’ll leave that up to you!