title: echo Hello username after login
body: <p>The first thing the user is asked is to login; if the login is successful the user is sent to the index.php if not; they're asked to re-enter their details.  </p>
  
  <p>I want the username to display on the index.php AFTER the user logs in; </p>
  
  <p>so using an echo function in the index.php file to <code>GET</code> the username from the login</p>
  
  <pre><code>//check to see if they match
  if($username==$dbusername&amp;&amp;$password==$password)
  {
  $_SESSION['username']=$username;
      echo "Welcome '.$username.'";
      header('Location: nindex.php');
      die(); 
  }
  else
  echo "incorrect password";
  
  }
  else
      die("That user does not exist");
  }
  else
      die("please provide a  username and password");
  
  ?&gt;
  </code></pre>