D Dobby Member Nov 8, 2010 156 5 Feb 25, 2013 #1 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?
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?
J JayNZ Member Feb 22, 2011 78 7 Feb 25, 2013 #2 You need to explain what you mean by work for email or rank.. Are you trying to get the data for email and rank? Upvote 0 Downvote
You need to explain what you mean by work for email or rank.. Are you trying to get the data for email and rank?
D Dobby Member Nov 8, 2010 156 5 Feb 25, 2013 Thread starter #3 Im trying to get a page that will show the personl that logged in their email and what rank they are Upvote 0 Downvote
NSA sudo apt-get thefuckout.tar.gz Dec 9, 2011 715 86 Feb 25, 2013 #4 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']; } ?> Upvote 0 Downvote
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']; } ?>