simple flatfile reg-login with sessions v1 & v2

Started on the old forum in August 2012 · view the original in the archive · old links redirect here

2 replies · 736 views · started 14 years ago · 1 min read

2 participants
Ghost Senior · 366 posts #1

ok so i create a flat file register / login script as a base for my next script. i wasnt happy with it, then i created a v2 of it abit more advanced. but still wasnt happy. and in the end i went a totally different way all together using functions and what not.

instead of the 2 reg/login scripts going to waste ill just share them here as "TEMPLATES" / starter scripts for the more unexperienced coders lets say.

v1 = 1 file database. (username and password go to same file) v2 = 2 file database (username and password go to seperate files)

xhtml/css/php/java/sessions/encrypted passwords (java for login alert.. removed in my new script in end)

i will. (maybe real soon) create/share a more advanced version at some point using functions and security measures etc. probably just strip my reg/login from my new project as thats all sorted in this area.

anyway hope these help ppl get started down the right path.

Demos: V1: Simple

V2: Abit More Advanced

<?php include ('Ghost'); if ($Post == true) { echo ' ![](http://destrukt.dk/ico/phpdeveloper.jpg) alt='coding-talk.com!!' />'; echo 'Sharing Is Caring!'; } else { echo ' ![](http://img98.imageshack.us/img98/6476/av3ro4.jpg) alt='the username GHOST has been comprimised!' />'; echo 'OMG SOMEBODY HELP ME!!'; } ?>
Ghost Senior · 366 posts #3

ozziemale31 wrote: nice css but i get The server is too busy at the moment.

Please reload this page few seconds later.

thanks. yeah demo's hosted on 000webhost.com so prob will have some issues.

ive almost finished ripping out my new login/register script from my project. which includes:

functions sessions encrypted passwords file protection username/password protection .htaccess file. members count. site visited counter. also includes file creating of passwords.txt, usernames.txt and count.txt files on first time use. probably some other goodies hidden too that i forgot to mention.

soon as im finished with ripping it out/modding it from my existing colors/site scheme ill upload that one. its 100 times better. 🙂

<?php include ('Ghost'); if ($Post == true) { echo ' ![](http://destrukt.dk/ico/phpdeveloper.jpg) alt='coding-talk.com!!' />'; echo 'Sharing Is Caring!'; } else { echo ' ![](http://img98.imageshack.us/img98/6476/av3ro4.jpg) alt='the username GHOST has been comprimised!' />'; echo 'OMG SOMEBODY HELP ME!!'; } ?>

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close