hey i have some php expirence but not that much and im wondering if someone could help me here. the problem is that i need to display a user information so he/she can edit it if needed and ect. so i am trying to call a session in a mysql query. i dont know if this will work (so far it hasnt) and i need help. so here is the code
anyone tell me what im doing wrong?
thanks in advance
i forgot that i wanted to tell you i have the connect to the database but i just didnt feel like posting it
Edit:
i am sorry that i have posted this form but i have now figured it out.:biggrin:
PHP:
$query="SELECT * FROM users WHERE username = ". $_SESSION['myusername'] ."; ";
$result=mysql_query($query) or die(mysql_error());
$num=mysql_numrows($result);
echo "<b><center>Account Info</center></b><br><br>";
$i=0;
while ($i < $num) {
$name=mysql_result($result,$i,"name");
$username=mysql_result($result,$i,"username");
$email=mysql_result($result,$i,"email");
echo "Name:<br><b>$name</b><br><br>Username:<br>$username<br><br>E-Mail:<br>$email<br><hr><br>";
$i++;
}
?>
anyone tell me what im doing wrong?
thanks in advance
i forgot that i wanted to tell you i have the connect to the database but i just didnt feel like posting it
Edit:
i am sorry that i have posted this form but i have now figured it out.:biggrin:
Last edited: