this something along the line of this: this is just a sample code, so you might want to give your hands a try.
//get the $username and $password from the field. you can try doing an md5 on the pass variable if thats how you saved it;
$query = "select * from users where username = '$username' AND password = '$password'";
and then you can use this to save it in the session variable:
$query2 = mysql_query($query);
while ($row = mysql_fetch_assoc($query2)){
$_SESSION['somename'] = $row['somenamefrommysql'];
$_SESSION['anothername'] = $row['someothernamefrommysql'];
}
that should save it in the session: make sure you start the session at the beginning the page by
session_start();
hope that helps...
post code if not working
----------------
Never bother to learn something not knowing which does not do you any harm, and never neglect to learn something whose negligence will increase your ignorance - Imam Jafar Sadeq
|