если пойму это то и для самого сайта вход сделаю)
HELP!

$res = mysql_query("SELECT * FROM `table` WHERE `login` = 'login' AND `password` = 'password' AND `admin_access` = 1");
if(mysql_num_rows($res)) {
echo 'есть доступ в админку';
}
<?php
session_start() ;
require "../config/admin.php" ;
if($_SESSION['allow']) {
exit ("<table border=\"2\" width=\"20%\" height=\"20%\" align=\"center\">
<tr>
<td align=\"center\">
<h3><a href=\"index.php\">Поздравляем! Вы можете войти!</a>
</h3>
</td>
</tr>
</table>");
} elseif($_POST['nickname'] and $_POST['pass']) {
if($_POST['nickname'] === $config->SITE_ADM and $_POST['pass'] === $config->ADM_PASS ) {
$_SESSION['allow'] = rand();
exit ("<table border=\"2\" width=\"20%\" height=\"20%\" align=\"center\">
<tr>
<td align=\"center\">
<h3><a href=\"index.php\">Поздравляем! Вы можете войти!</a>
</h3>
</td>
</tr>
</table>") ;
}
}
?>
<form method="post">
Логин <input type = "text" name = "nickname" /><br />
Пароль <input type ="password" name = "pass" />
<input type = "submit" name = "send_logon" />
</form>
select nick,password from info WHERE admin = '1' ORDER BY idчто написать то?)