Hello< i am having an issue with IF statements displaying the right data. Im selecting from my databse the userlevel an depending on the number access they have it will show verbage as opposed to the number. Easy enough a simple IF statment and bam. SO I test it with level 3 hey it works great let me test it with level 9, hey it showing me as level 3. Imnot sure waht I am missing but for some reason I cannot get this to work right. ANyone see what I am misisng? Thank you
<?PHP
//Checks user level and displays access level to website
$access = $session->username;
if ($access = 9)
{
$access =' Founder';
}
if ($access = 8)
{
$access =' Admin';
}
if ($access = 7)
{
$access =' Air Staff';
}
if ($access = 6)
{
$access =' MAJCOM/CC';
}
if ($access = 5)
{
$access =' Wing/CC';
}
if ($access = 4)
{
$access =' Squadron/CC ';
}
if ($access = 3)
{
$access =' Student ';
}
if ($access = 2)
{
$access =' Pilot ';
}
if ($access = 1)
{
$access =' CRAF Member';
}
?>