Jump to content
xisto Community
HmmZ

Php Simple Login Tutorial Learn how to make a simple login

Recommended Posts

Oh my god!Thank you so much for this script i've been looking everywhere for this kind most of them i couldnt understand still it took me a while to do this but it still worked!

Share this post


Link to post
Share on other sites

Don't you people think that creating a login script like the one mentioned with only plain php sessions can invite a lot of security related troubles.

php.net themselves say that if you are going to use sessions then be sure to implement some extra security measures as they can compromise security you can find the page here: PHP Sessions

If someone is using it for just testing or learning then its ok to use them as is, but if you are planningfor a site that requires security like e-commerce website then you must apply some more securities measures to it. Like by encrypting the data etc.

Share this post


Link to post
Share on other sites

AMAZING!!This tutorial is so cool and easy to understand even though im just a beginner in PHP and MySql! ill be sure to use it in the near future! :XD:Alothugh dont you think the admin system is a little un secure i mean anyone could go to memberadmin.php and activate their account

Edited by Chyu (see edit history)

Share this post


Link to post
Share on other sites

Hello guys!First of all I have to say I'm still a beginner in php. I've been trying this tutorial to see how is working and everything was OK until I got this: ERROR: User not added to database.:( ... probably is something I've done wrong ... i just can't figure it out why!Anyone could care and help me out? Thx.-MrNewt

Share this post


Link to post
Share on other sites

I am having trouble with this tutorial code, on the login page it logs me in but when it goes to the members area it automatically shoots me back to the login page. It's like it's forgetting that i logged in. I'm thinking it has something to do with the session stuff, but i'm a noob and can't figure it out. any help?

Share this post


Link to post
Share on other sites

okay, do the email, you simply have to add a mail function to the script,


$to	  = 'nobody@example.com'; //replace with the email of the administrator$subject = 'the subject'; //change it to better suit ur needs$message = 'New user signed up'; //replace the message with something else u want$headers = 'From: webmaster@example.com' . "\r\n" .	'Reply-To: webmaster@example.com' . "\r\n" .	'X-Mailer: PHP/' . phpversion();mail($to, $subject, $message, $headers);

insert this line of code before
// Redirect to thank you page.

hopefully that should work...

but i have some other issue, when ever it does the login bit, and when i go to see the members page, it does not work. It simply loads the page as if the user has signed into the website but not really.

the session valid user does not have any values attached to it. what could be the problem?

Share this post


Link to post
Share on other sites

Hello guys!First of all I have to say I'm still a beginner in php. I've been trying this tutorial to see how is working and everything was OK until I got this: ERROR: User not added to database.

:P ... probably is something I've done wrong ... i just can't figure it out why!

Anyone could care and help me out?
Thx.

-MrNewt



ah whats the problem? what are you doing?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.