Hiya i'm trying to set a login script where ther user peterh logs in they goto this page and if other users log in they got to another page i can get it to work for the user peterh .. but when i try one of the normal users they get dissallowed .. could some one help?
<?
mysql_connect("localhost", "root", "password")
or die ("Unable to connect to server.");
mysql_select_db("rentdb")
or die ("Unable to select database.");
$sql = "SELECT id
FROM users
WHERE user='$user' and pass='$pass'";
$result = mysql_query($sql)
or die ("Unable to get results.");
$num = mysql_numrows($result)
or die ("You're not authorized to be here. If you feel you have recieved this
message in error, please contact the <a
href=\"mailto:peterh@vfsa-erentals.com.au\">webmaster</a>");
if ($user == peterh){
include "g.ggg";
}
elseif ($num == 1) {
include "quote2.html";
}
?>
Thanks Peter