title: How to access php SESSION variable in javascript
body: <p>I'm trying to create an image uploading website. In this, when a user logs in, I set a <code>$_SESSION['id']</code> variable in php. Now, I wish to check if <code>$_SESSION['id']</code> is set in my javascript file (general.js) in order to carry out certain functions. How should I go about doing it?</p>