Jump to content

Login/register Using Php


e4games
 Share

Recommended Posts

There is no code in the database. The database is what your code connects to. You need to have at least one table in your database to store user information. Username, password, email, whatever else you want to keep. You need one script that will give the user a form where they can create their username and password, and you'll want to check the database to see if those already exist.The login script would then just see if the information they give when they log in is correct. If it is, it logs them in. If not, then it gives them an error.If you don't know how to write a script that will do that, I suggest reading some tutorials on php.

Link to comment
Share on other sites

I try making a table for the database but when ever I make it a error message comes up saying something is incorrect....this is what I put inCREATE TABLE register(number# int,username varchar(225),password varchar(225))Thats what I type and a error message comes up......what am I doing wrong?

Link to comment
Share on other sites

CREATE TABLE `users` (`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,`email` VARCHAR( 255 ) NOT NULL ,`name` VARCHAR( 255 ) NOT NULL ,`password` VARCHAR( 40 ) NOT NULL)

Edited by jlhaslip
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...