Esia0 Posted May 18, 2003 Share Posted May 18, 2003 Ok i Created a database . . then how am i going to add a username to it ? and also the password do i need to create a table for it? ? ? pls advise .. thanks alot ! Quote Link to comment https://forums.phpfreaks.com/topic/477-creating-new-users-in-a-database/ Share on other sites More sharing options...
Avalanche Posted May 18, 2003 Share Posted May 18, 2003 Yes, you will need to create a table with at least two fields. I would make one named \"username\" and one named \"password\". Try setting both to a varchar of 50. Also, you may want to encrypt the password before you insert it into your table. Quote Link to comment https://forums.phpfreaks.com/topic/477-creating-new-users-in-a-database/#findComment-1615 Share on other sites More sharing options...
shivabharat Posted May 19, 2003 Share Posted May 19, 2003 Esia if u are looking to restrict the database based on the user then u have to set the permission level in the user table select * from `mysql`.`user Quote Link to comment https://forums.phpfreaks.com/topic/477-creating-new-users-in-a-database/#findComment-1628 Share on other sites More sharing options...
jpjsmith Posted May 20, 2003 Share Posted May 20, 2003 i understand the coulumn type for a password should be varchar and encryption is a good idea- the questoin is, how do you encrypt the password? Quote Link to comment https://forums.phpfreaks.com/topic/477-creating-new-users-in-a-database/#findComment-1634 Share on other sites More sharing options...
shivabharat Posted May 20, 2003 Share Posted May 20, 2003 Use md5() function in PHP U cant dencrypt a md5 all u can do is compare 2 md5 strings!! like get the password from user convert that to md5 using PHP md5() and then compare it !! Hope this helps! Quote Link to comment https://forums.phpfreaks.com/topic/477-creating-new-users-in-a-database/#findComment-1635 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.