pouncer Posted January 23, 2007 Share Posted January 23, 2007 [code=php:0] function GetUserNameFromID($id) { $sql = mysql_query("SELECT username FROM users WHERE userid='$id'"); return what??; }[/code]how do i actually return the username Quote Link to comment Share on other sites More sharing options...
ted_chou12 Posted January 23, 2007 Share Posted January 23, 2007 you will need to add:$row = mysql_fetch_array($sql);return $row['username'];Ted Quote Link to comment Share on other sites More sharing options...
pouncer Posted January 23, 2007 Author Share Posted January 23, 2007 perfect, thanks. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.