i made table in my database called users, it has such fields:
id|username|password||type
type - is for example, admin, member, limited..
index.php
<form name="form1" id="form1" method="post" action="check.php">
<b>user:</b><br />
<input type="text" name="user" maxlength="60" style="width:200px;"><br /><br />
<b>pass:</b><br />
<input type="password" name="pass" maxlength="60" style="width:200px;"><br /><br />
<input type="submit" name="login" value="login!" >
</form>
check.php
$db_host = 'localhost';
$db_user = 'xxx';
$db_pass = 'xxx';
$db = "page";
$con = mysql_connect($db_host, $db_user, $db_pass);
mysql_select_db($db);
if (!$con) {die('error');}
$sql = "SELECT * FROM users ????????";
?????
HOW TO CHECK THAT USER AND PASSWORD IS CORRECT?
?????
if ok ..
session start
else
index.php...
mysql_close($con);
can somebody help me to work on this script?