This code is supposed to get the user id from my database but it returns this : Resource id #6
So how would I code this to make it return the user id?Here is my code so far and I know that mysql_query is becoming outdated:
<?php
include("login_check.php");
include("dbconnect.php");
mysql_select_db("maxgee_close2");
$username = $_COOKIE['maxgee_me_user'];
$user_id = mysql_query("select user_id from users where username = '$username'");
echo "$user_id";
?>
1 Answer