Support Forums

Full Version: [PHP] Login && Register With Remember Me Option [mySQL]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Firstly, create a mySQL account, and create a new table (in phpmyadmin) with this code.

Code:
CREATE TABLE users (
    username varchar(30),
    password varchar(32));

Now, create a file named "database.php" and paste this code in


Now, create a file called "register.php" and paste in this code.

This registration page has:
Register Page
Register Failed
Register Success

Now create "login.php" and paste this code:


Now of course, you'll be needing a main page.
So create a new file called "main.php" and paste in this code:


Credits:


Enjoy.

+REP is appreciated.
NOt bad
niice...

Whats with the weird font though? All smooshed together and bold font = hard to read.
(10-10-2009, 06:07 AM)Extasey Wrote: [ -> ]niice...

Whats with the weird font though? All smooshed together and bold font = hard to read.

Ah, true, ill change it.
Updated Smile
nice tutorial...it's good for php newbs like me...question....when I go to the register.php file and enter in a username/password and it redirects and you hit the 'log in' link, it takes me to the main.php file and it says not logged in, but it doesn't give me an option to log in...
(10-10-2009, 03:01 PM)andrewjs18 Wrote: [ -> ]nice tutorial...it's good for php newbs like me...question....when I go to the register.php file and enter in a username/password and it redirects and you hit the 'log in' link, it takes me to the main.php file and it says not logged in, but it doesn't give me an option to log in...

You register, and you go to "login.php"
nice script
(10-11-2009, 02:51 AM)Bartdevil Wrote: [ -> ]You register, and you go to "login.php"

no.....when I register an account and hit login, it redirects me to main.php...

I copy/pasted all your code so it's not a coding error on my part.
Not that great, not that bad
It's not my coding.. you've failed somewere, or your just successfully logged in..

I've copy and pasted the coding, along with 2 friends no errors.
Pages: 1 2