Displaying cookie info...
Posted: Mon Jan 29, 2007 7:56 pm
Edit: Note to self. {$happiness['happy']} Use brackets and stuff.
>>Heyo... So I got around to making the cookie login, and it logs in all fine, and sets the cookie. What I'm having a problem with is, is taking info from the cookie and displaying it correctly. The result turns up blank; won't show up in the table.
Even if I replace what to echo, with $user, it doesn't display. What's up?
>>Heyo... So I got around to making the cookie login, and it logs in all fine, and sets the cookie. What I'm having a problem with is, is taking info from the cookie and displaying it correctly. The result turns up blank; won't show up in the table.
Code: Select all
$user = $_COOKIE['cookie'];
$query = mysql_query("SELECT * FROM users WHERE username='$user'");
?>
<!-- 700 x 600 methinx -->
<center>
<table width="95%" height="100%" valign="top" border="1">
<tr>
<td height="75" colspan="2"> <?php echo "$query" ?></td>
</tr>
<tr>
<td height="400" width="10%"> </td>
<td height="400" width="90%"> </td>
</tr>
<tr>
<td height="25" align="center" colspan="2"><?php include("footer.html"); ?></td>
</tr>
</table>