title: My PHP else is not showing properly
body: <p>When the login password or username its incorrect it doesent echo the error when it should, anyone got any idea why that is?
  I have checked the code many times and still cant find why the errror happens so it will be great if someone could fix my code</p>
  
  <pre><code>&lt;?php
  define('DB_HOST', 'localhost');
  define('DB_NAME', 'radio');
  define('DB_USER','anuar');
  define('DB_PASSWORD','admin');
  
  $con=mysql_connect(DB_HOST,DB_USER,DB_PASSWORD) or die("Failed to connect to MySQL: " . mysql_error());
  $db=mysql_select_db(DB_NAME,$con) or die("Failed to connect to MySQL: " . mysql_error());
  /*
  $ID = $_POST['user'];
  $Password = $_POST['pass'];
  */
  function SignIn()
  {
  session_start();   //starting the session for user profile page
  if(!empty($_POST['user']))   //checking the 'user' name which is from Sign-In.html, is it empty or have some text
  {
      $query = mysql_query("SELECT *  FROM members where Username = '$_POST[user]' AND Password = '$_POST[pass]'") or die(mysql_error());
      $row = mysql_fetch_array($query) or die(mysql_error());
      if(!empty($row['Username']) AND !empty($row['Password']))
      {
          $_SESSION['Username'] = $row['Password'];
          echo "SUCCESSFULLY LOGIN TO USER PROFILE PAGE...";
  
      }
      else
      {
          echo "SORRY... YOU ENTERD WRONG ID AND PASSWORD... PLEASE RETRY...";
      }
  }
  }
  if(isset($_POST['submit']))
  {
      SignIn();
  }
  
  ?&gt;
  </code></pre>