Right, here goes. Been on this most of the night and failing...
I've got a checklogin.php:
Which then forwards fine to an "about.php" containing the following:
If I echo these values instead of redirecting to this page, they appear. But it seems once I navigate away, they disappear...
Somebody please point out what I'm doing wrong
I've got a checklogin.php:
Code:
<?php
ob_start();
mysql_connect ("*********", "************", "***********") or die(mysql_error());
mysql_select_db("musync_articles") or die(mysql_error());
$username = $_POST['myusername'];
$password = $_POST['mypassword'];
$result = mysql_query("SELECT * FROM `users` WHERE username='$username' and password='$password'") or die(mysql_error());
$count = mysql_num_rows($result);
if($count==1){
session_start();
$_SESSION['username']=$username;
$_SESSION['password']=$password;
if (isset($_SESSION)) {
header("location:http://somewhere/about.php");
} else {
header("location:http://somewhere/login.php?err=1");
}
exit();
ob_end_flush();
?>
Which then forwards fine to an "about.php" containing the following:
Code:
<?php echo $_SESSION['username']; echo $_SESSION['password']; ?>
If I echo these values instead of redirecting to this page, they appear. But it seems once I navigate away, they disappear...
Somebody please point out what I'm doing wrong

Last edited: