// Now create an object from the data you've retrieved.
$row = mysql_fetch_object($result);
// You've now created an object containing the data.
// You can call data by using -> after $row.
// For example now the password is checked if they're equal.
if($row->password != $password) {
echo "
I am sorry, but the passwords are not equal.";
echo"<META http-equiv=refresh content=1;URL=index.php>";
exit;
}
// By storing data inside the $_SESSION superglobal,
// you stay logged in until you close your browser.
$_SESSION['username'] = $username;
$_SESSION['sid'] = session_id();
// Make it more secure by storing the user's IP address.
$_SESSION['ip'] = $_SERVER['REMOTE_ADDR'];
// Now give the success message.
// $_SESSION['username'] should print out your username.
echo "Succes ai reusit sa te loghezi domnule " . $_SESSION['username'];
echo "<br><a href=\"access.php\">Click Aici!</a>";
}
}