darkfreaks Posted September 26, 2010 Share Posted September 26, 2010 hgey guys im trying to create a text based login but im having trouble to get the echo to show up on submit.php which is the form action page for signup.html. am not sure how i would make it showup on either file. <?php $myFile = "password.txt"; $fh = fopen($myFile, 'w') or die("can't open file"); $data= strip_tags($_POST['Username']); fwrite($fh,$data); fclose($fh); $File = "username.txt"; $fh2 = fopen($File, 'w') or die("can't open file"); $mydata = strip_tags($_POST['Password']); fwrite($fh2,$data); fclose($fh2); echo "You have Signed up Successfully Congrats!"; ?> Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted September 26, 2010 Share Posted September 26, 2010 The code you posted doesn't seem to relate to the question asked. There are some problems with this code: 1) You're storing the username in the file named password.txt and the password in the file named username.txt 2) There's nothing in your code to say which password goes with which password 3) You REALLY should be using a database for this. Ken Quote Link to comment Share on other sites More sharing options...
darkfreaks Posted September 26, 2010 Author Share Posted September 26, 2010 Closing this found a decent hosting site Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.