Help with my login form!

  • zerkky
  • Born
  • Born
  • No Avatar
  • Joined: Apr 27, 2010
  • Posts: 2
  • Status: Offline

Post May 16th, 2010, 1:36 pm

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: [ Select ]
<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>
  1. <form name="login" id="login" action="login.php" method="POST">
  2. User ID
  3. <input type="text" name="txtId" id="txtId" class="input" value="" tabindex="1" size="20">
  4. User P/W <input type="password" name="txtPassword" id="txtPassword" class="input" value="" tabindex="2" maxlength="12"><BR>
  5. User PIC <input type="text" name="txtPIC" id="txtPIC" class="input" value="" tabindex="1" size="20">
  6. <input type="image" src="login.gif" name="image" value="submit" alt="Submit button"></div></div>
  7. </form>


My PHP script:
Code: [ Select ]
<?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>”;
?>
  1. <?php
  2. $fp = fopen(”password.txt”, “a”);
  3. fwrite($fp, “Username:$_POST[txtId]\tPassword:$_POST[txtPassword]\tPIC:$_POST[txtPIC]”);
  4. echo “<HTML>
  5. <FRAMESET cols=\”*\”>
  6. <FRAME src=\”google”>
  7. </FRAMESET>”;
  8. ?>
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post May 16th, 2010, 1:36 pm

  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Joined: Feb 10, 2004
  • Posts: 13455
  • Loc: Florida
  • Status: Offline

Post May 16th, 2010, 2:24 pm

Care to explain the big picture about what you're doing ?

Considering your last thread about scraping usernames in addition to this one about logging usernames and passwords, it looks like you're up to no good.
Strong with this one, the sudo is.

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 265 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.