...or not? I'm still a newbie, I got this code from a tutorial in YouTube.

<?php
session_start();
$company = $_POST['company'];
$password = $_POST['password'];
if($company&&$password)
{
$connect = mysql_connect("localhost","root","") or die("Couldn't connect!");
mysql_select_db(phplogin) or die ("Couldn't find database");

$query = mysql_query("SELECT * FROM users where company = '$company'");
$numrows = mysql_num_rows($query);
if ($numrows!=0)
{
while ($row = mysql_fetch_assoc($query))
{
$dbcompany = $row['company'];
$dbpassword = $row['password'];
}
if ($company==$dbcompany&&md5($password)==$dbpassword )
{
echo "You're in! <a href = 'member.php'>Click</a> here to enter the member page.";
$_SESSION['company']=$company;
}
else
echo "Incorrect password! <a href = 'Home.php'>Click</a> here to return.";
}
else
die("That user doesn't exist! <a href = 'Home.php'>Click</a> here to return.");
}
else
die("Please enter a company and password!");
?>

What code should I add that will determine if the user is admin or not? I added an admin field in the table. What I want is it will detect the company(this is equivalent to username) you typed in, if its admin value is equivalent to 1, it should go to adminhome.php, but if it isn't, it will go to memberhome.php