i figured that out, and along with an error in the mysql_query which got a bit messy but now its clean. what i need now is to know now is how to make it go to a new page after logging in, this page will be userhome.php and i want each user to have a different home, so basically i think i want it to be userhome.php?id=username.
i got my code:
<?
$db_name = "root";
$table_name = "users";
mysql_connect("localhost", "root", "pass")
or die("Couldn't connect to the database. Try again later.");
mysql_select_db($db_name)
or die("Couldn't select database. Try again later.");
$sql .= 'SELECT * FROM users WHERE user_name = "notaloser" AND user_pass = "march"';
if ($HTTP_POST_VARS['submit']) {
$result = mysql_query($sql)
or die ("<span class=text><div align=center>Can't execute query.</div></span>");
$num = mysql_numrows($result);
if ($num != 0) {
session_register('userok');
$userok = "yes";
}
}
?>
ive tried header location but i dont think im doing it right.
if someone could give me the header code and tell me where to put it, taht would be great, and give me some tips and ideas on how to make each users userhome.php page origional to them