Can I display an "incorrect password" message in a previous signin.html page after i have already moved to a logincheck.php page <p>my signin.html is just a common html page with username and password fields..nd a sign in button ..and i just want to display all those error messages under echo in the previous signin.html page.The code for logincheck.php is as followed:</p> <pre><code>&lt;?php session_start(); $username = $_POST['username']; $password = $_POST['password']; if($username &amp;&amp; $password) { $connect = mysql_connect("localhost","root","") or die("Couldn't connect!"); mysql_select_db("project") or die("Couldn't find db"); $query= mysql_query("SELECT * From signup1 WHERE username='$username'"); $numrows = mysql_num_rows($query); if ($numrows!=0) { //code to login while ($row = mysql_fetch_assoc($query)) { $dbusername = $row['username']; $dbpassword = $row['password']; } if($username==$dbusername&amp;&amp;$password==$dbpassword) { $_SESSION['username']=$username; header('Location:mailbox.php'); } else echo "Incorrect password!"; } else die("That user does't exist!"); } else die("Please enter username and Password!"); if($_SESSION['username']) echo "Welcome, " .$_SESSION['username']."!&lt;br&gt;&lt;a href='logout.php'&gt;Logout&lt;/a&gt;&lt;br&gt; "; else die ("You must be logged in!"); ?&gt; </code></pre>