This is part of the code that I have already:
Code: Select all
<?
$conn = mysql_connect("###", "###", "###") or die(mysql_error());
mysql_select_db('###', $conn) or die(mysql_error());
$result = mysql_query("SELECT * FROM users",$conn);
printf("First Name: %s<br>\n", mysql_result($result,0,"firstname"));
printf("Last Name: %s<br>\n", mysql_result($result,0,"lastname"));
printf("Gender: %s<br>\n", mysql_result($result,0,"gender"));
mysql_close($conn);
?>
Code: Select all
$result = mysql_query("SELECT * FROM users WHERE username=$username",$conn);
What do I need to put, so that it displays information of a person who is logged in? Can someone reply asap plz. Thank you!
P.S. Sorry forgot the most important thing. This is where I got the code from:
http://www.evolt.org/article/comment/17 ... index.html