开发者

how to get value from java script then store in php variable

开发者 https://www.devze.com 2022-12-22 18:31 出处:网络
Duplicate: Access a JavaScript variable from PHP hi i want ge开发者_如何学编程t value from java script, then i will use the value in php, both are in single php file.

Duplicate:

Access a JavaScript variable from PHP

hi

i want ge开发者_如何学编程t value from java script, then i will use the value in php, both are in single php file.

send how to connect with these two in single file....

thanks


you can use post or get request to your current page (or to another page) using <form> tag or ajax. Then in the php you will use $_REQUEST (or $_POST or $_GET) which act as associative array with the key being the name of your variable. So if you submitted mypage.php?foo=bar

in php $_REQUEST['foo'] will be bar.

0

精彩评论

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

关注公众号