Use PHP sessions with jquery

后端 未结 7 1430
我寻月下人不归
我寻月下人不归 2021-01-26 10:02

Well, my question is simple:

I wish to use my PHP sessions in jQuery, in an if statement, however I do not know how I can do this on an easy way. Am I supposed to someho

7条回答
  •  离开以前
    2021-01-26 10:30

    Php is a server side language. javascript runs on the browser (client side).You can do this:

    if($admin == true || gebr_id == $_SESSION['id'])
    echo "";
    

    }

    So that you're just rendering HTML

    hope it helps

提交回复
热议问题