This script keeps erroring on " $unchk = $_COOKIE['username'];" and I can't figure out why. Can someone please help me out?
<?php
if ((isset($COOKIE['username'])) || (isset($COOKIE['logcode'])))
{
db_connect()
$unchk = $COOKIE['username'];
$chk = "SELECT * FROM $dbmembers WHERE username=$unchk";
$chl = mysql_query($chk);
$chj = mysql_result($chl,0,"logcode");
if ($COOKIE['logcode'] = $chj)
{
$chn = mysql_result($chl,0,"userlevel");
if ($chn = 1)
{
menu_1();
}
if ($chn = 2)
{
menu_2();
}
}
} ELSE
{
menu_guest;
}
?>