Quote:
Originally Posted by derekivey
You could try this:
PHP Code:
$getuser = $db->query_read("SELECT userid FROM user WHERE username='".$db->escape_string($username)."'");
$user = $db->fetch_array($getuser);
echo("The userid for $username is <b>$user[userid]</b>");
|
If I may ask for more help, how can I put a reality check into this to verify that the value in $username matches something that is in the database? As it is now, if there is a typo the server generates a MYSQL error.