[PHP/JavaScript]: Call PHP file through JavaScript code with argument

后端 未结 4 921
不思量自难忘°
不思量自难忘° 2021-01-28 14:44

I want to call a PHP file but want to pass an argument to the PHP file. Not getting the correct approach, I am attempting to write a cookie and read that cookie when the PHP fil

4条回答
  •  后悔当初
    2021-01-28 15:15

    Well I'm not sure what it is you are ultimately trying to achieve but it sounds like using AJAX could be your solution. There is a good tutorial here.

    AJAX will basically allow you to call a php script, pass it variables and then use it's output on your webpage.

提交回复
热议问题