title: How to implement a "Log In First To Access Webpage"?
body: <p>Basically I have certain pages on my website which I only want to show if the user is logged in. However my only idea is to do it with Bootstrap and say in PHP if the user is logged in the class should be <code>show</code> (to show the content), otherwise <code>hide</code>.. but I do not believe this is a good way to do it. (show and hide are classes from Bootstrap)</p>
  
  <p>Basically I am working with an API so the only possibility to view content is anyways to log in, however I still want to say "Log In First To see Your Data" instead of only showing an empty page without anything.</p>
  
  <p>Can you give me some ideas please?</p>
  
  <p>I thought about something like this:</p>
  
  <pre><code>&lt;?php echo $isLoggedIn ? "Welcome, ". $user['first'] : "LOG IN FIRST"; ?&gt;
  </code></pre>