Jump to content

Archived

This topic is now archived and is closed to further replies.

Esia0

Creating New USers in a Database

Recommended Posts

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 !

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.