0

I want to select an element using javascript and then want to query the database to search for that element.

Eg - The element that I want to select is a string called "Crate". Now I want to select crate, pass it onto a PHP variable and do a search the db for crate.

How do i do that?

thank you

Somehting like -

window.href="smaple.com/profile.php?username='crate';

and then use crate in profile.php with get function

1 Answer 1

0

I think the best thing for you to do is to read this AJAX, PHP tutorial.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.