Page 1 of 1
Join + login pages with out mysql.
Posted: Mon Feb 17, 2003 1:35 pm
by Darkside
How hard would it be to make a join and a log in page with out using sql & mysql?
Any tutorials would help.
Posted: Mon Feb 17, 2003 3:52 pm
by bionicdonkey
not very...u would just have to use something else to store the values. e.g text file.
Posted: Mon Feb 17, 2003 4:22 pm
by patrikG
You could also just have the password and login hardcoded into variables in the php-page itself.
Code: Select all
<?php
$login="myLogin";
$password="myPassword";
?>
Posted: Mon Feb 17, 2003 10:16 pm
by lc
That's the way I do it.
I store a name/pasword and randomly generated code (generated when the account is made) in a "textfile" or actually it's a .php file with just <?php on the first line and ?> on the last so that no one can access it without ftp access.
Then after people login I set a variable in the links like:
<a href=\"$PHP_SELF?id=$the_random_code\">link</a>
And every time a page loads I check if the code exists and if so they are logged in.
I also store the time/date of the latest login of that user... if it's too long ago... they have to login again.
Currently the code I use consists of 3 letters and a number between 100 and 1.. which means almost 2 million combos are possible... secure enough for me since no one really knows where the code is hidden in the string I use for the $id variable which usually holds more data as well.
Could you...
Posted: Mon Feb 17, 2003 11:10 pm
by Plex
Could you send me a copy of that script and a small tutorial on how to use it and set it up on my site? I really would like to use something like that. I help run a few websites that both get close to 20k hits a day and we need something of this sort, it would help us out tremendously. Please let me know, thanks.
Posted: Tue Feb 18, 2003 12:01 pm
by Sky
It's really easy, actually. just go to the new sessions topic and learn about session managment. once you do that,the only problem left to you will be storage... and tha'ts easy.I found a cool ini file array format storage function collection... like it?
It's what I'm using, and it's pretty self explanitory.