title: Check whether user is logged in or not
body: <p>I am doing a web-application using PHP for job searching.</p>
  
  <p>I have one query; when user is not logged in and wants to apply for the job given by clicking 'apply' button, he redirects to the login page. If the user <em>is</em> logged in when clicking, he should get directly to the application page. I'm not sure how to implement this.</p>
  
  <p>I'm confused because I'm new to PHP.</p>