how to pass a value to php variable by ajax

前端 未结 4 2036
花落未央
花落未央 2021-01-25 05:40

this is my javascript code :

function  category(row){
    dataparam = \"oper=delete&row=\"+row;
    $.ajax({
        type: \"POST\",
        url: \"multiuplo         


        
4条回答
  •  长情又很酷
    2021-01-25 06:15

    $opers = (isset($_REQUEST['oper']) and $_REQUEST['oper'] != '' ) ? $_REQUEST['oper'] : '';  
    if($opers == "delete")
    {
         $row=$_REQUEST['row'];
         echo $row;
    }
    

    Hopefully the problem is with the extra curly brackets. Check it. I have corrected the code. Let me know if it works. And there is an extra s in opers.

提交回复
热议问题