<?php
include "opendb.php";
$name=$_POST['name'];
$pass=$_POST['pass'];
$uzk=mysql_query("SELECT count(id) FROM prisijungimas WHERE name='$name' and pass='$pass'");
$result=mysql_result($uzk, 0);
if ($result!=1) echo "Prisijungimas nepavyko :(.";
else {
echo "Prisijungimas pavyko :)!";
$_SESSION['name']=$name;
};
?>