0

Hi everyone,

I have had the current users sessions set up for three days now and today for no reason what so ever the sessions have now stoppped working. I have no idea but if i echo the session it shows but wont pass through pages on my site. Please help, thanks in advance and heres the code im using on the login page:

if ($getprocess == "login") {
			
			include("includes/db_connect.php");
			$username = $_POST['username'];
			$password = $_POST['password'];
			
			$checkusername = mysql_query("SELECT * FROM users where username = '$username' AND password = '$password'");
			$username_exists = mysql_num_rows($checkusername);
			
			if ($username_exists == "1") {
				$_SESSION['user'] = $username;
				//mysql_query("UPDATE users SET `status` = 'Online' WHERE username='$username'");
				//echo "You have been logged in, Redirecting You...";
				//echo('<meta http-equiv="refresh" content="0;url=http://www.jtagheaven.co.uk">');
			} else {
				echo("You have entered a wrong username or password. Click <a href='login.php'><font color='white'><u>here</a></u></font> to try again unless you have forgotten you password in which case click <a href='forgot-pass.php'><font color='white'><u>here</u></a></font>.");

PS i know about the end if statements these are further on but thats all u need. Thanks again...

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by whiteyoh
0

you need to add the following to the top of the page inside the php tags

session_start();
ob_start();
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.