Hi.. I use this code for alot of my scripts.. and now that I am making a new website.. it all of the sudden just goes bad. I don't know why...
<?php
session_start()
?>
<?php
$session = session_id();
$db = mysql_connect("xxx","xxxxxxx") or mysql_die ("Unable to Connect to Mysql.. please contact Brandon about this!");
mysql_select_db("lipside",$db);
$sql = mysql_query("SELECT * FROM users WHERE username='$username' AND password='$password'");
if(mysql_num_rows($sql) == 1) {
while($row = mysql_fetch_array($sql)){
$username = $row['username'];
$password = $row['password'];
$email = $row['email'];
$aim = $row['aim'];
$real_name = $row['real_name'];
$_SESSION['username'] = $username;
$_SESSION['password'] = $password;
$_SESSION['aim'] = $aim;
$_SESSION['email'] = $email;
$_SESSION['real_name'] = $real_name;
echo "<meta http-equiv='refresh' content='1;URL=membersarea.php?$session'>";
}
}
else {
echo "Wrong Username or Password. Please login again.<br>"; }
?>
I know it is not session'ing because when it directs itself to membersarea... it doesnt display any data...