Tucker Posted March 24, 2005 Report Posted March 24, 2005 Ok I have been trying to make a login system, but it never works. Honestly Im about to give us... It's driving me insane. So now I ask can you guys help me. Well first I better explain what needs to be involved in the system, because it's going to be esential for my site, it needs this login system so you can login and out very easily, and also it cant be stored in cookies you know what I mean. Anyway so where do I start off with? Quote
olajideolaolorun Posted March 24, 2005 Report Posted March 24, 2005 Start of with making the database and tables needed. Also the information you will be collecting form users during registration and then we move on to programming. Quote Best Regards Olajide Olaolorun The Uniform Server Development Team
Tucker Posted March 25, 2005 Author Report Posted March 25, 2005 Got all that figure out. at this point only need:Username:Password:Retype Password:Email:Retype email:Visual Confirmation: You know where you have to type in the numbers that appear like an image thing, what ever they are called.I also want it, so it sends an email for an activation of the account.Oh the table is called user. Quote
elyk Posted March 25, 2005 Report Posted March 25, 2005 You know where you have to type in the numbers that appear like an image thing, what ever they are called.they are called captchas (completely automated turring test to tell computers and humans apart) Quote
olajideolaolorun Posted March 25, 2005 Report Posted March 25, 2005 Those do not go in the database. They are randomly generated by PHP and tested to see if the user input is the same as the input generated. Are you done with the databse? BTW: We will leave the varification option and do that last just so we do not mess everything up Quote Best Regards Olajide Olaolorun The Uniform Server Development Team
Tucker Posted March 25, 2005 Author Report Posted March 25, 2005 Well i think it's done for now. It is possible to store in when they last visited right? Also when they registered as well? Apart from that I think that's it. Quote
olajideolaolorun Posted March 26, 2005 Report Posted March 26, 2005 Yes, it is possible to do that Just put it in the user table PS: I wish i had time to write it for you but i will just be joking if i said i did. Also, i am using modem connection where i am so, my time on the net is limited because i am tieing down the phone line. Here is what we will do, we will start with the login and logout and then the others... I will start on the code for you and then attach it. I will also put comments there to help you understand Also, the first scripts will just be the login and logout, no registration or anything. Try and attch the .sql file as a .txt file so i can know what table and co. you are set to use. Quote Best Regards Olajide Olaolorun The Uniform Server Development Team
Tucker Posted March 26, 2005 Author Report Posted March 26, 2005 No, no. It's fine that you help that way. It will help me learn to get this right. Honestly, I am always lost when it comes to keeping logged in etc... Quote
olajideolaolorun Posted March 28, 2005 Report Posted March 28, 2005 K, attach you MySQL file so i can know what i am working with ...being busy recovering the Admin Panel 2.0 files Quote Best Regards Olajide Olaolorun The Uniform Server Development Team
Tucker Posted March 29, 2005 Author Report Posted March 29, 2005 would that just be the user table in this case? Quote
olajideolaolorun Posted March 29, 2005 Report Posted March 29, 2005 Yeah i think... Quote Best Regards Olajide Olaolorun The Uniform Server Development Team
Tucker Posted March 30, 2005 Author Report Posted March 30, 2005 ok here is the attached file._user.txt Quote
olajideolaolorun Posted March 30, 2005 Report Posted March 30, 2005 K.. work on it ... Quote Best Regards Olajide Olaolorun The Uniform Server Development Team
Falc Posted February 15, 2006 Report Posted February 15, 2006 This is a "login" script thatwill work for anyone to "log in". ;D Note: This is not a register script, this is a login script. The $SESSION['login'] = true; means that they're logged in. Okay? Okay.That also means it requires a session_start(); in the script. So place this where it's needed. I will include something that you need to do yourself, for example, the forms and also the database queries. /* Start of script */// login.php/*Created by: Falc 15 February 2006Language: PHPLicense: Do what ever you like. However, I'd like to to keep my nickname(creator) in. If not, no big deal I suppose but I would like just that in return for posting this. Thanks.*/session_start(); if ($_POST['password'] == NULL && $_POST['username'] == NULL) { // If the user has not posted anything in the user column. /* Display the form here, send it to login.php (this file) and also the field names need to be 'username' and 'password */}else{ // if the user has entered something $query = "SELECT password FROM table where username = '".$POST['username']."'"; $result = mysql_query($query); $sqlpass = mysql_fetch_array($result); /* the SQL code will obviously need to be changed to suit the table layout but it should be enough. */ if ($POST['password'] == $sqlpass['password']) { // If the posted password is the same as stored in the database $SESSION['login'] = true; echo "You are now logged in, yay."; } else { // If this isn't true, however echo "I'm sorry but the password or the username you entered is incorrect."; } } /* End of script */ Quote Known Languages:adv-XHTML, int-PHP, int-SQL, int-CSS, beg-PythonCurrently reading: Take off in Japanese, How to play popular piano in 10 easy lessons, The Magicians' GuildCurrently learning: Python, Piano, JapaneseCurrent project: RelaxingCurrently playing:
Falc Posted February 16, 2006 Report Posted February 16, 2006 The script should work fine provided that the MySQL database/tables are correctly created.http://forum.uniformserver.com/index.php?a...DE=02&f=21&t=38This is an example table with adding 1 users inside of it. Theres 2 SQL scripts for this...Creating the table:CREATE TABLE table (username varchar(30),password char,id int(15) AUTO_INCREMENT PRIMARY KEY); Adding the users:INSERT INTO table (username, password)VALUES ("foo", "bar"); Quote Known Languages:adv-XHTML, int-PHP, int-SQL, int-CSS, beg-PythonCurrently reading: Take off in Japanese, How to play popular piano in 10 easy lessons, The Magicians' GuildCurrently learning: Python, Piano, JapaneseCurrent project: RelaxingCurrently playing:
olajideolaolorun Posted February 17, 2006 Report Posted February 17, 2006 Right now i am too busy so sorry... can't help. I bearly have time for myself.... just school and work.. and i do not even get to watch TV ahhhhhhhhhhh... Quote Best Regards Olajide Olaolorun The Uniform Server Development Team
kalpz Posted July 17, 2006 Report Posted July 17, 2006 Did you get it working?? Quote ATOMIC Web Hosting 2007 - 2011 Shared Hosting - Reseller Hosting - Dedicated Servers - Virtual Private Servers (Request Dedicated/VPS Servers via E-mail) E-mail: sales@atomicwebhosting.com Website: http://www.atomicwebhosting.com/
olajideolaolorun Posted July 19, 2006 Report Posted July 19, 2006 Quote Best Regards Olajide Olaolorun The Uniform Server Development Team
davil Posted March 9, 2007 Report Posted March 9, 2007 I just went with Simpleauth for this type of thing and custom built my PHP around it. I even added md5 encryption! It was so easy to change a line here or there it just had the perfect basics for anyone who has an idea of mySQL and PHP. Quote
Tucker Posted May 2, 2007 Author Report Posted May 2, 2007 HuH thanks for the help there Believe it or not I was just looking for something like this :angry: Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.