проверка правильно ли залогиниться юзер
<?php
require_once('header.php');
require_once ('bd.php');
if(isset($_POST['submit']))
{
if (empty($_POST['loginname']) && empty($_POST['password']))
{
echo "error empty login and password";
}
if (empty($_POST['loginname']))
{
echo "error empty login";
}
if (empty($_POST['password']))
{
echo "error empty password";
}
$result = mysql_query("SELECT `password`, `login` FROM `reg_users` WHERE `login`=$form_login, `password`=$form_password");
if ($form_login !== $myrow['login'] or $form_password !== $myrow['password'])
{
echo "login or password dont match";
}
header("index.php");
}
?>