Author Topic: Creating New USers in a Database  (Read 1419 times)

0 Members and 1 Guest are viewing this topic.

Offline Esia0Topic starter

  • Irregular
  • Posts: 1
    • View Profile
Creating New USers in a Database
« on: May 18, 2003, 05:53:04 AM »
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 !                    

Offline Avalanche

  • Enthusiast
  • Posts: 390
    • View Profile
Creating New USers in a Database
« Reply #1 on: May 18, 2003, 02:59:07 PM »
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.                    
DEFINE("YOU","Spending Too Much Time On The Computer");

Offline shivabharat

  • Addict
  • Posts: 2,404
    • View Profile
Creating New USers in a Database
« Reply #2 on: May 19, 2003, 07:26:32 AM »
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

Code: [Select]
select * from `mysql`.`user                    
Knowledge --- Reading Enriches Mind But Sharing Enhances It.Note: Before you request help enusre that you have had a look at the tutorials @phpfreaks

Offline jpjsmith

  • Irregular
  • Posts: 17
    • View Profile
Creating New USers in a Database
« Reply #3 on: May 20, 2003, 05:28:18 AM »
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?                    

Offline shivabharat

  • Addict
  • Posts: 2,404
    • View Profile
Creating New USers in a Database
« Reply #4 on: May 20, 2003, 05:50:04 AM »
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!                    
Knowledge --- Reading Enriches Mind But Sharing Enhances It.Note: Before you request help enusre that you have had a look at the tutorials @phpfreaks