Support Forums
[PHP] Login && Register With Remember Me Option [mySQL] - Printable Version

+- Support Forums (https://www.supportforums.net)
+-- Forum: Categories (https://www.supportforums.net/forumdisplay.php?fid=87)
+--- Forum: Coding Support Forums (https://www.supportforums.net/forumdisplay.php?fid=18)
+---- Forum: PHP The Hypertext Preprocessor (https://www.supportforums.net/forumdisplay.php?fid=21)
+---- Thread: [PHP] Login && Register With Remember Me Option [mySQL] (/showthread.php?tid=1029)

Pages: 1 2


[PHP] Login && Register With Remember Me Option [mySQL] - Bartdevil - 10-10-2009

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.



RE: [PHP] Login && Register With Remember Me Option [mySQL] - Akshay* - 10-10-2009

NOt bad


RE: [PHP] Login && Register With Remember Me Option [mySQL] - Extasey - 10-10-2009

niice...

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


RE: [PHP] Login && Register With Remember Me Option [mySQL] - Bartdevil - 10-10-2009

(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


RE: [PHP] Login && Register With Remember Me Option [mySQL] - andrewjs18 - 10-10-2009

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...


RE: [PHP] Login && Register With Remember Me Option [mySQL] - Bartdevil - 10-11-2009

(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"


RE: [PHP] Login && Register With Remember Me Option [mySQL] - brett7 - 10-11-2009

nice script


RE: [PHP] Login && Register With Remember Me Option [mySQL] - andrewjs18 - 10-11-2009

(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.


RE: [PHP] Login && Register With Remember Me Option [mySQL] - HuNt3R - 10-11-2009

Not that great, not that bad


RE: [PHP] Login && Register With Remember Me Option [mySQL] - Bartdevil - 10-11-2009

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.