Just thought of something. In your script, is the string $sql=\"SELECT, ect.
All on one line? or is it on seperate lines like in your post?
You have to build the string all on one line, or use .=
$sql = \"SELECT * FROM adminsection WHERE\";
$sql.= \" username = $HTTP_COOKIE_VARS[\'username\'] AND\";
$sql.= \" password = $HTTP_COOKIE_VARS[\'password\'] AND\";
$sql.= \" pin = $HTTP_COOKIE_VARS[\'pin\']\";
As for using extract(), it creates varibales form the keys of an associative array.
So if you have the keys as above in your query, then
extract($HTTP_COOKIE_VARS);
would allow you to build the query using $username, $password, and $pin, instead of $HTTP_COOKIE_VARS[\'username\'], ect.
Keep i mind that variable scope still applies. So if you use extract from within a function, once your function is finished running, the variables no longer exists. Using extract() doesn\'t affect the values within $HTTP_COOKIE_VARS, they will still be intact.
Also, if the variables $username, ect, already exist, they will be over written when you extract the variables from the array.
Using extract is just a preference of mine. It saves from having to type out the array name and keys so many times.