This is my code:
<?php
session_start();
include_once 'dbconnect.php';
if(!isset($_SESSION['user']))
{
header("Location: index.php");
}
$res=mysql_query("SELECT * FROM suppliers WHERE user_id=".$_SESSION['user']);
$userRow=mysql_fetch_array($res);
?>
The error occurred after I introduced a trigger to my table suppliers and changed the user_id from int to varchar such that instead of being 1 or 3 now it is SUPL001, when a I log in with wrong credentials it accepts and displays the error above. The page does not echo the name of the user on the header link