Login system without registration

Hey! I’m completely new to PHP, and I need to make a website with a phpmyadmin attached to it (idk the correct terminology). But I only want a specific amount of people to have accounts, and people that dont have accounts cant see the whole website. Does anyone have any good tutorials or anything for login systems without registration? I’ve been researching for ages and can’t find anything. Thank you!

Before relying on any tutorial for this I suggest you read this. It’s written for NodeJS but just as valid for PHP

Hi :slight_smile:

I recommend mmtut’s tutorial https://www.youtube.com/watch?v=xb8aad4MRx8 to create a complete login system. I think you should be able to easily figure out how to create a login system without a registration once you understand the main concepts. He takes you through the steps in such a way that a complete beginner can understand.

The problem with tutorials like these are that they are pretty much always lacking. mmtut’s tutorial doesn’t even use prepared/parameterized queries which became the de facto standard 10 years ago as it’s our only real protection against sql injection hacks.

That’s probably one of the only things that’s lacking in his tutorial (particularly the loginsystem one). Besides, he has a tutorial on prepared statements as well, and he advises you how to use it in his other tutorials. I think he’s pretty much amazing for any beginner out there.

Hey! Surprisingly, I started with mmtuts’ tutorial and it proved to be very helpful. But since i’m not really familiar with php, when I tried to change the code to make it so the system gets the usernames and passwords manually entered into the database, it doesn’t seem to work.

Thank you, i’ll try to get the most out of this article!

There was a stage when I wanted to do the exact same thing, and after some time got it to work well. I can email you the files if you like, and you can compare them to mmtut’s code to see the differences and try to figure out what you did wrong from there.
I started learning PHP only recently too, so if you don’t mind a beginner’s help I am willing to spare you some time ^.^

That would be great! I’d see the difference between your code and his, and that would teach me lots on how php functions. My email is [email protected] . Thank you so much!

You’re welcome :slight_smile:
I’ll send it in a moment.

1 Like

Okay, I’ve sent the files over.

Notice the extra file in the no-registration folder that gives a commented-out breakdown of the steps you can take to create a PHP-hashed password without using PHP itself.

Thank you very much! I just sent a request so I can access the files from google drive. Have a nice day!

Sponsor our Newsletter | Privacy Policy | Terms of Service