title: Password and username displaying in input fields?
body: <p>I have a silly problem that i just cant figure out. when i refresh my login page the password and username appears in the input fields. here is my code:</p>
  
  <pre><code>&lt;?php include_once "includes/scripts.php"; ?&gt;
  &lt;?php
  session_start();
  include_once ("includes/connect.php");
  if (isset($_SESSION['logged_in'])) {
      header('location: admin_cms.php');
  }else{
      if (isset($_POST['username'], $_POST['password'])){
          $username = $_POST['username'];
          $password = md5($_POST['password']);
          if (empty($username) or empty($password)){
              $error = '&lt;p&gt;NOTE: Fields are blank&lt;/p&gt;';   
          }else{
              $query = $pdo-&gt;prepare("SELECT * FROM users WHERE user_name = ? AND user_password =?");
              $query-&gt;bindValue(1, $username);
              $query-&gt;bindValue(2, $password);
              $query-&gt;execute();
              $num = $query-&gt;rowCount();
              if ($num == 1){
                  $_SESSION['logged_in'] = true;
                  header('location: admin_cms.php');
                  exit();
              }else{
                  $error = "&lt;p&gt;NOTE: The username or password is incorrect&lt;/p&gt;";  
              }
          }
      }
      ?&gt;
      &lt;div id="login_container"&gt;
          &lt;br&gt;&lt;img src="images/camelhorst_logo_full.png" style="margin-top:38px;"&gt;
          &lt;h1&gt;LOGIN&lt;img src="images/three_column_grid_line.png" alt="line"&gt;&lt;/h1&gt;
          &lt;form  acton = "admin.php" method="post" autocompleate="off"&gt;
              &lt;label&gt;Username:&lt;/label&gt;
              &lt;input type="text" name="username" placeholder="Your Username" required&gt;
              &lt;label&gt;Password:&lt;/label&gt;
              &lt;input type="password" name="password" placeholder="Your Password" required&gt;
              &lt;input type="submit"  value="Login" name="submit_login"&gt;
          &lt;/form&gt;
          &lt;?php if (isset($error))
          {echo $error;}?&gt;
        &lt;p id="copyright_admin"&gt; © CAMELHORSE CREATIVE STUDIO 2013 &lt;/p&gt;
      &lt;/div&gt;&lt;!--login_container--&gt;
  
      &lt;?php } ?&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Please can someone help me with this and also if anyone sees a issue that might be a security issue please correct me?</p>
  
  <p><img src="https://i.stack.imgur.com/04V5p.jpg" alt="My Login screen when i open the page or refresh"></p>