session_start();
ob_start();
include("config.php");
include("header.php");
$sqlConnection = mysql_connect(localhost,$username,$password) or die ('Unable to connect to the database because: ' . mysql_error());
@mysql_select_db($database) or die( "Unable to select database");
if (! isset($_SESSION['uname']))
{
//header('Location: http://theclt.org/livedescribe/wiki/login.php');
echo "You are not logged in
";
echo "login";
}
else
{
//echo $_SESSION['uname'];
$uname = $_SESSION['uname'];
$query = "SELECT id,name FROM `users` WHERE username='$uname' ";
$result = mysql_query($query);
if (mysql_num_rows($result) == 1)
{
$id = mysql_result($result, 0, "id");
$realname = mysql_result($result, 0, "name");
}
?>
Main
echo "Welcome " . $realname . "
";
echo "Edit your descriptions
";
echo "Edit your information
";
?>
Log out