Hello guys this is my PHP code that I written for decrease the "Credit" table on MySQL when people use from their Credit for buying facilities. But I want when their "Credit" is 0 they get Error that "Your Credit is not Enough , Please Buy a Credit" . But I see "echo" doesn't give this error ! What is the problem in my code ? 

```
<?php
if (session_id() == "")
{
   session_start();
}
if (!isset($_SESSION['username']))
{
   $accessdenied_page = '';
   header('Location: '.$accessdenied_page);
   exit;
}
$mysql_server = 'localhost';
$mysql_username = '*******';
$mysql_password = '******';
$mysql_database = '******';
$mysql_table = 'details2';
$success_page = 'League.php';
$username = 'username';
$db = mysql_connect($mysql_server, $mysql_username, $mysql_password);
      if (!$db)
      {
         die('Failed to connect to database server!<br>'.mysql_error());
      }
      mysql_select_db($mysql_database, $db) or die('Failed to select database<br>'.mysql_error());

$sql = "UPDATE `".$mysql_table."` SET `Credit` = `Credit` - 20  WHERE `username` = `".$username."` AND `Credit` >= 20";

mysql_query($sql, $db);

header('Location: '.$success_page);
exit;
?> 

```