开发者

Using Javascript to getElement and then PHP to query database

开发者 https://www.devze.com 2023-02-02 12:48 出处:网络
I want to select an element using javascript and then want to query the database to search for that element.

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 f开发者_如何学运维or 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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消