I wanted to make a members page on my where people had to create a login to become part of site.I watched a video and made mysql members data base in phpadmin.This is where i'm stuck,i wanted to know how to put this onto my site but not sure how to go about it.I don't know where to get the code or where to put it on site builder ,unless there is another way to create a working member page.
A login and register page is what i want.I made this in phpmyadmin, but don't know what to do with it.
ID int(11) No
usename varchar(255) No
sign_up_date datetime No
email varchar(255) No
bio text Yes NULL
account_permissions enum('a', 'b', 'c') No b
email_activation enum('0', '1') No 0
password varchar(255) No
lastlogin datetime No
This is my first time dealing with this while making a site.Very new to me.
Save this as loginit.php
define('DB_USER', 'YOUR_DATABASE_USERNAME'); //Change Username with Your
define('DB_PASSWORD', 'YOUR_DB_PASSWORD'); //Change Password with Your
define('DB_DATABASE', 'YOUR_DB_NAME'); //Change Database name with Your
mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);
Do NOT use er.rohittank22's code. It is incredibly insecure (vulnerable to SQL injection, vulnerable to session hijacking, stores passwords as plaintext). It also uses the outdated (and soon-to-be deprecated) mysql extension. It's a great example of why you shouldn't do this yourself for production sites. You should design and build a login system only to learn or if you've a strong understanding of security issues.
The topic of logins and user systems has been covered many times before on this forum. Search for relevant threads to get better answers.