I am a newbie to php and have a issue. I have a login code but i need the code to when admin login it sends then to a page with the admin menu bar. When a non admin login it sends them to the same page but with the non admin menu bar.
I have a users table called "teams" with a column name "role" and 1 as admin and 2 as non admin...
Here is my whole login code. Each member has a id so id # 3,15,17 are admin id's and 1,2,4,5,6,7,8,9,10,11,12,3,14,16,18,19,20,21,22,23,24,25,26,27,28,29,30,31 are non admin id;s.. Can anyone help with this code??? Ive tried this ive tried that and i just cant seem to get the dam thing right.
Here is the code:
It has to easy. Im missing something but my php verbal knowledge isnt where it needs to be. Im a disabled vet and have taught all i know myself by reading and reading. Problem is part of my disability is a mental, memory thing... Anyway if anyone could show me how and what im doing wrong i would be very greatfull.PHP Code:
<form action="http://www.virtualhockeyassociation.com/onlogout.php" method="post" name="logForm" id="logForm" >
Welcome <?php session_start(); echo $_SESSION['GM'];?>!
<input type="submit" value="Log Out" />
echo "SELECT * FROM teams where email='$email' and password='$password'";
$result = mysql_query("SELECT * FROM teams where email='$email' and password='$password'");
<form action="http://www.virtualhockeyassociation.com/signin.php" method="post" name="logForm" id="logForm" >
<label class='loginLBL' for='username'>USERNAME:</label><input name="usr_email" type="text" class="required" id="txtbox" size="20">
<label class='loginLBL' for='password'>PASSWORD:</label><input name="pwd" type="password" class="required password" id="txtbox" size="25">
<input name="doLogin" type="submit" id="doLogin3" value="Login">
Thank you and god bless