Using db query in print
Posted: Wed Jul 11, 2007 10:36 am
I have executed the following:
How can I associate the id with the name of the user that is logged in.
The logged in user has a cookie with their username as ['ID_my_site']
The username has a corresponding ID in the db and i want the id to be a variable $id.
Could someone please change/rewrite the code so that the variable would work.
Thanks
Code: Select all
$id = mysql_query('SELECT id FROM ibf_members');
print "http://forum.example.com/index.php?showuser=$id"The logged in user has a cookie with their username as ['ID_my_site']
The username has a corresponding ID in the db and i want the id to be a variable $id.
Could someone please change/rewrite the code so that the variable would work.
Thanks