How would i go about making a registration form for a login script. It runs flat file and works by getting the usernames and passwords from /log.txt
How could i make a form that would add usernames and passwords to that.
+Rep for any help
Printable View
How would i go about making a registration form for a login script. It runs flat file and works by getting the usernames and passwords from /log.txt
How could i make a form that would add usernames and passwords to that.
+Rep for any help
Thats extremely insecure, I would suggest switching to a MySQL based solution.
All someone would have to do is visit that text file for all of the users' usernames and passwords.
Yes i know. I'm just using it as a basic example.
Could anyone help me?
Yep, It has htaccess... And i will do when the sites done. Atm it dont really matter. Nothing to protect
Name makes no difference if you configure an htaccess file, just make it so it can only be read by the server.
Done ^^
Anyone Help Me?
search the forms for a submit form because i remeber someone requesting when you submit
somthing it saves to something.txt ;p
@above - WIT?!
Um, it depends how your logs.txt file is layed out.. As it will have to be exploded..
if its
Then you'd do something likeCode:User1||password
User2||password
Then build a login system around that (which i really cba doing atm)PHP Code:<?php
$s = @file_get_contents("logs.txt");
$uinf = nl2br($s);
$uinf = explode("<br />",$unif);
foreach($uinf as $user)
{
$userinf = explode("||",$user);
$username = trim($userinf[0]);
$password = trim($userinf[1]);
}
?>
But that bit of code will break up the usernames and passwords.
Oh right sorry, thought u wanted login part...
just use fwrite ?