when you first login it shows it for about 1 second then goes it goes away.
I think whoever fixed the code, has earned their bounty -- 99% sure this has nothing to do with the code you originally posted.
I was getting the same results as, I am with there code so...
no the users info shows up for a second then it goes away. Here is the whole page code
Code:
<?php
/*
**********
Member Page
**********
*/
/* Include Code */
include("assets/member.inc.php");
/* Is an Action set? */
if(isset($_GET['action'])) {
$action = $_GET['action'];
} else {
$action = null;
}
if(isset($_GET['subaction'])) {
$subaction = $_GET['subaction'];
} else {
$subaction = null;
}
if($action == 'logout') {
echo $member->logout();
$title = 'Logging user out';
$content = '<div class="notice info">You are being logged out...</div>';
} elseif($action == 'settings') {
$member->LoggedIn();
$user = $member->data();
if($subaction == 'password') {
$title = 'Change Password';
$content = $member->changePassword($user->id);
} elseif($subaction == 'email') {
$title = 'Change E-Mail';
$content = $member->changeEmail($user->id);
} elseif($subaction == 'delete') {
$title = 'Delete Account';
$content = $member->deleteAccount($user->id);
} else {
$title = 'Settings';
$content = '<a href="member.php?action=settings&subaction=password" class="button full">Change Password</a><a href="member.php?action=settings&subaction=email" class="button full">Change E-Mail</a><a href="member.php?action=settings&subaction=delete" class="button full">Delete Account</a>';
}
} elseif($action == 'register') {
$title = 'Create an account';
$content = $member->register() . '<p class="options group"><a href="member.php?action=login">Already have an account?</a> • <a href="member.php?action=recover-password">Recover Password</a></p>';
} elseif($action == 'recover-password') {
$title = 'Recover your password';
$content = $member->recoverPassword() . '<p class="options group"><a href="member.php?action=login">Already have an account?</a></p>';
} elseif($action == 'verification') {
$title = 'Your account has been verified';
$content = $member->verification() . '<p class="options group"><a href="member.php?action=login">Already have an account?</a></p>';
} else {
$title = 'Login';
$content = $member->login() . '<p class="options group"><a href="member.php?action=register">Register</a> • <a href="member.php?action=recover-password">Recover Password</a></p>';
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><?php echo $title; ?></title>
<!--CSS Files-->
<link rel="stylesheet" type="text/css" href="assets/css/style.css" />
<head>
<title><?php echo $title; ?></title>
<!--CSS Files-->
<link rel="stylesheet" type="text/css" href="assets/css/style.css" />
</head>
<body>
<div id="members" class="group">
<h1><?php echo $title; ?></h1>
<?php echo $content; ?>
<html>
<body>
<?php
$con=mysql_connect('localhost', 'xxx', 'xxxxx');
if (!$con) { die('Could not connect: '.mysql_error()); }
mysql_select_db("xxxxxx", $con);
$username=$_POST['username'];
$username=mysql_real_escape_string($username);
$result=mysql_query("SELECT * FROM users WHERE username='$username'");
$row=mysql_fetch_array($result);
echo "Email: ".$row['email']."<br/>";
echo "Username: ".$row['username'];
mysql_close ($con);
?>
Login Successful
<p><a href="index.php\">Click here to logout!</a></p>
</body>
</html>
well first of all, this code has two heads
remove one of them:
<head>
<title><?php echo $title; ?></title>
<!--CSS Files-->
<link rel="stylesheet" type="text/css" href="assets/css/style.css" />
then change
<?php echo $content; ?>
<html>
<body>
<?php
to
<?php echo $content; ?>
<?php
Still nothing lol been working on this for close to 3 hours now...... brain fried
fixed all that payb.tc said with no avail lol, came from all the cuting and pasting trying to fix this dang thing