c_pattle Posted May 3, 2010 Share Posted May 3, 2010 Hey I'm not sure if this it the correct place to post this but if not then feel free to move it. I've created a mysql table to store user names and password and am trying to create a log in page which checks the username and passwords are valid. I used this sql to create the table "create table users (first_name varchar(25) not null, last_name varchar(25) not null, username varchar(20) unique, password varchar(16);" However when I try to insert data into the table using "insert into users (first_name, last_name, username, password) values ("jack", "jones", "jack", password("jack"));" it says there is a warning. It's something to do with the password because when you view the table the password is stored as a 15 character string with a "*" at the start. Does anyone know what I'm doing wrong? Quote Link to comment https://forums.phpfreaks.com/topic/200587-mysql-password-warning/ Share on other sites More sharing options...
PFMaBiSmAd Posted May 3, 2010 Share Posted May 3, 2010 The mysql password() function is not supposed to be used by user applications - The PASSWORD() function is used by the authentication system in MySQL Server; you should not use it in your own applications. For that purpose, consider MD5() or SHA1() instead. And if you were using it, it requires 41 characters to store and it apparently does include a leading * - '*AAB3E285149C0135D51A520E1940DD3263DC008C' Quote Link to comment https://forums.phpfreaks.com/topic/200587-mysql-password-warning/#findComment-1052573 Share on other sites More sharing options...
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.