This question already has an answer here:
- Pass a return value from php to js 1 answer
- How to access php session in javascript file? 3 answers
I'm trying to create an image uploading website. In this, when a user logs in, I set a $_SESSION['id'] variable in php. Now, I wish to check if $_SESSION['id'] is set in my javascript file (general.js) in order to carry out certain functions. How should I go about doing it?
</div>