Login system

By X-FILE on Aug 20, 2004

Just a simple login system..i used to have it in my site now i think it might be usefull for anyone who needs a login system.. Feel free to modify.

<?php

if (isset($_SESSION['username'])) {

    echo "Hello <b>{$_SESSION['username']}</b>";

} else {

    echo "Hello <b>Guest</b><br />";
    echo "Would you like to login?";

}
?> 

;EOF; X-FILE.

Comments

Sign in to comment.
localhost   -  Mar 24, 2008

Hi, we have a url where it asks for a username and password before we can login to it. May I request if someone can create a script to have this thing automated. Or if its possible if some can create a php script similar to this? I dont have access to our SQL but I can upload script to our PHP server.

What I was planning to do is create a php script that contains my username and password and the url of the page that im trying to login and will upload this script to our php server. So users can just visit my link and probably theirs a button that says click here to log-in they will click it and will automatically be redirected to the url that I specify with out them having to manually type my username and password.

Thanks

 Respond  
X-FILE   -  Aug 20, 2004

Right , database is needed. But i didn\'t have the chanse to submit it , since i can submit only one file here. To those who are interested just pm or email me and I\'ll give the full source.

 Respond  
Hawkee   -  Aug 20, 2004

Interesting, but how do you determine if the person is valid to log in? You probably need a database of some sort

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.