
07.05.2008, 21:32
|
|
Постоянный
Регистрация: 11.11.2006
Сообщений: 834
Провел на форуме: 3941248
Репутация:
668
|
|
PHP код:
<?php
/**
* @author
* @copyright 2008
*/
if (isset($_POST['submit']))
{
$f = file('users.txt');
foreach ($f as $v)
{
$arrusers = explode(';',$v);
if($_POST['username'] === $arrusers[0] && $_POST['password'] === $arrusers[1]) {
echo "Вход успешно выполнен!";
break;
}
}
}
?>
<form method="post" action="testreg.php">
<p>Username : <input type="text" name="username" size=10></p>
<p>Password : <input type="pass" name="password" size=10></p>
<p><input type="submit" name="submit" value="OK"></p>
</form>
|
|
|