Parašė zaiboras· 2011 Kov. 24 20:03:48
<div class="main">
<center><div class="textas">Prisijungimas</div></center>
<?php
error_reporting(E_ALL ^ E_NOTICE);
if (isset($_POST['login'])) {
$pass = md5($_POST['password']);
$_POST['nickas'] = addslashes($_POST['nickas']);
require "connect.php";
$check = mysql_query("SELECT * FROM USERS where nickas = '".$_POST['nickas']."' ");
$check2 = mysql_num_rows ($check);
if($check2 == 0) {
print "Vartotjas neregistruotas.";
} else {
while($infoUser = mysql_fetch_array($check)) {
if($pass != $infoUser ['password']) {
print "Neteisingas slaptazodis";
} else {
$time = time()+ 3600;
}
}
}
}
?>
<form action="index.php?id=log" method="post" />
Nickas:
<input type="text" name="nickas" /><br>
Slaptazodis:
<input type="password" name="password" /><br>
<input type="submit" name="login" value="Prisijungti">
</form>
</div>