Change value of PHP variable with AJAX

后端 未结 4 560
刺人心
刺人心 2021-01-24 09:11

The PHP:


The HTML:

4条回答
  •  天命终不由人
    2021-01-24 09:47

    You would have to modify your PHP script to allow for this.

    For example:

    PHP:

    if (isset($_POST['change']))
    {
        $mainView = $_POST['change'];
        echo $mainView;
    }
    

    HTML & jQuery:

    
    
    

提交回复
热议问题