Hello Friends I need help in one function
i want to get user info via id with function
example first if i need just username i have to do is
but i want to get multiple queries from it
i want to di is get array from that function and show it like if username then select username query via function n show it then show gender and other stuff how will that work please help me ??
i want to get user info via id with function
example first if i need just username i have to do is
PHP Code:
function username($id)
{
$query = mysql_fetch_array(mysql_query("SELECT username FROM members WHERE id = '$id' ");
$username = $query[0];
}
$user_name = username($id);
echo 'hello $user_name';
PHP Code:
function userinfo($id)
{
$query = mysql_fetch_array(mysql_query("SELECT * FROM members WHERE id = '$id' ");
}
Comment