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!"; ?> Link to comment https://forums.phpfreaks.com/topic/214398-help-with-readwrite-login/ 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 Link to comment https://forums.phpfreaks.com/topic/214398-help-with-readwrite-login/#findComment-1115678 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 Link to comment https://forums.phpfreaks.com/topic/214398-help-with-readwrite-login/#findComment-1115679 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.