e4games Posted May 28, 2009 Share Posted May 28, 2009 How do you create a login and register using PHP. I know that it has to be a MySQL database but what does the coding have to be in both the database and the page itself. Link to comment Share on other sites More sharing options...
justsomeguy Posted May 28, 2009 Share Posted May 28, 2009 Check here:http://w3schools.invisionzone.com/index.php?showtopic=12509 Link to comment Share on other sites More sharing options...
e4games Posted May 28, 2009 Author Share Posted May 28, 2009 Thanks!!! Link to comment Share on other sites More sharing options...
e4games Posted May 30, 2009 Author Share Posted May 30, 2009 so what does the code have to be in the data base?....that link was a little confusing could you create one code for login and on for register? Link to comment Share on other sites More sharing options...
Praetorian Posted May 30, 2009 Share Posted May 30, 2009 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 More sharing options...
e4games Posted May 31, 2009 Author Share Posted May 31, 2009 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 More sharing options...
jlhaslip Posted May 31, 2009 Share Posted May 31, 2009 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) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.