Showing MySQL details?

Dobby

Member
Nov 8, 2010
156
5
I have this working for username

$fetch_users_data = mysql_fetch_object(mysql_query("SELECT * FROM `members` WHERE username='".$_SESSION['username']."'"));
}

But i cant get it to work for email or rank. How would i do this?
 

NSA

sudo apt-get thefuckout.tar.gz
Dec 9, 2011
715
86
Perhaps it would be something like this:

<?php
$user = $_SESSION['username'];
$q = "SELECT * FROM members WHERE username = '$user'";
$r = mysql_query($q);
while($row = mysql_fetch_assoc($r)){
echo $row['rank'];
echo $row['email'];
}
?>
 

Users who are viewing this thread

Top