Код:
<?php
ob_start();
include "../settings.php";
$username=$_POST['username'];
$password=$_POST['password'];
$sql="SELECT * FROM users WHERE username='$username' and password='$password'";
$result=mysql_query($sql);
$count=mysql_num_rows($result);
if($count==1)
{
session_register("username");
session_register("password");
header("location: ../DNP/index.php");
}
else
{
header("Location: ../DNP/index.php");
}
ob_end_flush();
?>