title: How to stay signed in even after clicking refresh button
body: <p>I am new to php and I want to add a functionality such that whenever user fills the form and logs in, the php code runs perfectly fine but after refreshing the page user have to again fill the form. I don't know code nor have knowledge of further.I tried googling but I only see these kind of solutions:</p>
  
  <p>header(refresh: 5, url: url);
  or
  meta tag</p>
  
  <p>That refreshes automatically but not after clicking the refresh button.</p>
  
  <p>This is my php code: </p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
      &lt;link rel="stylesheet" type="text/css" href="services.css"/&gt;
      &lt;link rel="stylesheet" type="text/css" href="bootstrap-css/bootstrap.css"/&gt;
      &lt;link rel="stylesheet" type="text/css" href="bootstrap-3.3.5-dist/css/bootstrap.min.css"&gt;
      &lt;script type="text/javascript" src="validate.js"&gt;&lt;/script&gt;
      &lt;style&gt;
          a{
              color: dodgerblue;
          }
          a:hover{
              color: dodgerblue;
              font-size: 101%;
          }
          span{
              font-size: 110%;
              line-height: 8px;
              font-style: bold;
              margin-left: 50px;
          }
          body{
              background-color: #F0F0F0 ;
          }
          button{
              margin-left: 15px;
          }
      &lt;/style&gt;
  &lt;/head&gt; 
      &lt;body link="slateblue"&gt;
          &lt;div id="LogIn"&gt;&lt;b&gt;Log In&lt;/b&gt;&lt;/div&gt;&lt;br&gt;
          &lt;form method="post" onsubmit="return logInPass()" action="log.php"&gt;
              &lt;div class="col-xs-4"/&gt;
                &lt;label for="usr"&gt;Email:&lt;/label&gt;
                &lt;input id="usrEmail" name="usrEmail" type="email" class="form-control" size="25%" placeholder="sample@example.com"/&gt;
              &lt;/div&gt;
              &lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
              &lt;div id="PasswordField" class="col-xs-4"/&gt;
                  &lt;label for="u_pswd"&gt;Password:&lt;/label&gt;
                  &lt;input id="u_pswd" type="password" class="form-control" size="25%" placeholder="Enter alteast 8 characters" /&gt;
              &lt;/div&gt;
              &lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
              &lt;button id="submit" name="checkout" class="btn btn-primary" type="submit" value="submit"&gt;Log In&lt;/button&gt;
          &lt;/form&gt;
          &lt;br&gt;&lt;br&gt;
          &lt;a href="SignUpForm.html" target="form"&gt;&lt;span&gt;Not a part of GameRangers? Click here for Sign Up!&lt;/span&gt;&lt;/a&gt;
          &lt;br&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  
  
    &lt;?php 
      echo "&lt;style&gt;body{font-family: segoe ui; font-size: 110%;}&lt;/style&gt;";
      session_start();
      $_SESSION['username'] = $_POST['usrEmail'];
      echo"Welcome  ".$_SESSION['username']."&lt;br&gt;&lt;br&gt;";
      echo "Today is ".date("Y-m-d")."&lt;br&gt;".date("h:i:sa")."&lt;br&gt;";
  ?&gt;
  </code></pre>