Set phps $_REQUEST['variable_name'] in JavaScript

后端 未结 4 677
轮回少年
轮回少年 2021-01-21 20:00

is it possible to store a variable through javascript so that I can read it in php using $_REQUEST[\'variable_name\'].

for eg. let\'s say i have

$adcat         


        
4条回答
  •  不知归路
    2021-01-21 20:55

    Does this make any sense? Is this possible?

    No and no :)

    PHP executes on server side before anything else, Javascript in the browser. The only way to do this in JavaScript would be to manipulate the form that makes that request before it gets submitted.

提交回复
热议问题