Quantcast
Channel: How to store $_SESSION variables in Javascript for XMLHttpRequest purposes? - Stack Overflow
Viewing all articles
Browse latest Browse all 3

Answer by JTinkers for How to store $_SESSION variables in Javascript for XMLHttpRequest purposes?

$
0
0

You don't have to use javascript to share information between PHP files (even if on separate servers).

$_SESSION is used explicitly to keep data between pages and you should handle it within them as such.

If you have to send user_id to a file on a different server, it's advised to do it inside of your PHP files and not Javascript (which is clientside and thus very prone to be abused).

You could simply use curl to perform a HTTP POST request.


Viewing all articles
Browse latest Browse all 3

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>