Do AJAX requests retain PHP Session info?

前端 未结 8 924
情书的邮戳
情书的邮戳 2020-11-28 18:52

If I had a user logged onto my site, having his id stored in $_SESSION, and from his browser he clicked a \'Save\' button which would make an AJAX request to th

8条回答
  •  暖寄归人
    2020-11-28 19:51

    It is very important that AJAX requests retain session. The easiest example is when you try to do an AJAX request for the admin panel, let's say. Of course that you will protect the page that you make the request to, not to accessible by others who don't have the session you get after administrator login. Makes sense?

提交回复
热议问题