Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[PHP] Login && Register With Remember Me Option [mySQL]
#1
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.
Reply
#2
NOt bad
[Image: 2d75599e9a.png]:superman:
Reply
#3
niice...

Whats with the weird font though? All smooshed together and bold font = hard to read.
Reply
#4
(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
Reply
#5
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...
Reply
#6
(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"
Reply
#7
nice script
hey, if you like my post then please give me +rep, it only takes two seconds but it will be greatly appreciated thanks!
Reply
#8
(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.
Reply
#9
Not that great, not that bad
Reply
#10
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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  PHP Framework List: An Ultimate Guide to 102 PHP Frameworks for Web Developers tk-hassan 0 936 07-27-2020, 11:26 PM
Last Post: tk-hassan
  Woocommerce Product Add-ons - Auto-select first option EFitzpatr7 0 1,408 04-21-2016, 02:09 AM
Last Post: EFitzpatr7
  [PHP] Very Basic Login Page BreShiE 17 7,917 07-11-2013, 05:57 AM
Last Post: 1n9i9c7om ツ
  [help] Improve login script Montana" 1 1,730 03-18-2013, 12:59 PM
Last Post: Haxalot
  User register page riptpage 0 1,183 10-27-2012, 06:40 AM
Last Post: riptpage

Forum Jump:


Users browsing this thread: 1 Guest(s)