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

后端 未结 4 922
不思量自难忘°
不思量自难忘° 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:13

    I think, you dont need cookies. try it with $.post, where you can define which url will be called, something like:

    $.post(url, params, callback_function);
    

提交回复
热议问题