Hey everyone!
I have an issue with the my checkuser.php..which is my login check that redirects certain users to a certain page, due to if they logged in as an admin or a regular user..I have a test site on my local server that works fine when I log in but for some reason when I use it for the site that needs to go up..it doesnt work..It just shows a blank checkuser.php and does nothing after login..
checkuser.php
<?php
error_reporting (E_ALL ^ E_NOTICE);
?>
<?php
session_start();
//connect to db
$connect = mysql_connect("*******","*****","*******");
mysql_select_db("******");
$get = mysql_query("SELECT * FROM users WHERE username ='".$_SESSION['username']."'") or die(mysql_error());
while($row = mysql_fetch_array($get))
{
$admin = $row['user_level'];
if ($admin == 0)
{
header("Location: index.php");
}
elseif ($admin == 1)
{
header("Location: Blog-admin-area.php");
}
else
{
echo "this is an invalid status";
}
}
?>