Code: Select all
<html>
<head>
<link rel="e;stylesheet"e; href="e;css.css"e; type="e;text/css"e;>
</head>
<body class="e;medium"e;>
<?php
require 'dbconnect.php';
$username = $_SESSIONї'username'];
if(empty($_SESSIONї'username']))
{
echo 'An error has occured. It may be that you are not logged in or your session has expired.';
}
else
{
$_SESSIONї'username'] = $username;
echo 'Welcome back '; echo $username;
echo '<table border="e;0"e;><tr>';
echo '<td width="e;200"e; height="e;20"e; align="e;left"e;>Fav Food:</td>';
echo '<td width="e;200"e; height="e;20"e; align="e;right"e;>'; echo $favfoodhere;
echo '</td></tr></table>';
}
?>
</body>
</html>i havent actually wrote the code yet cos i cant figure out how to do it but heres an example i did.
in the database there is a table called users. inside users there are many fields that have data in it. i was wondering how i would display that users details thats in those fields.
i didnt write out all the tables, one for each field but you get the idea
any help appriciated.