[PHP]Login script

Pie`

FS Member
This is a set of files I made that is a perfectly good login/logout system, it has a register page logout and login. It has full error catching for things like attempting to log in twice, trying to regsiter with empty fields, username already taken, invalid username, passwords dont match, invalid username + password for logging in, etc.

Forgot to include the logout file in the attatched archive.

PHP:
<?php
$_SESSION = array(); // Destroy the variables.
session_destroy(); // Destroy the session itself.
echo 'You have logged out succesfully.';
?>

P.S. The way I have made it is that you can't go to like, login.php to log in, you have to do index.php?page=login to log in, I won't explain why but IMO its better that way ;)
 

Attachments

  • login.zip
    2.4 KB · Views: 48
Not to bad for the people who aren't very confident with php. Indent? could of been easier to read :p Nice contribution :)
 
Back
Top