Board index   FAQ   Search  
Register  Login
Board index php forum :: Database mySQL & php coding

Password field

Codes here !

Moderators: macek, egami, gesf

Password field

Postby Xerpher » Tue Oct 01, 2002 4:12 pm

When I insert a row in phpMyAdmin I can chose Password in the dropdown menu beside the textbox that I enter something into. How would I do that through a php query?
Xerpher
New php-forum User
New php-forum User
 
Posts: 164
Joined: Tue Aug 27, 2002 8:25 pm
Location: Ontario, Canada

Postby DoppyNL » Tue Oct 01, 2002 10:42 pm

use this function with the fieldvalue:
Code: Select all
password("you'repassword")

and mysql will encrypt it.

There is also a topic here somewhere with a PHP-function that does the same in PHP itself.

Greetz Daan
DoppyNL
 

Postby Xerpher » Wed Oct 02, 2002 6:08 pm

Maybe I'm doing it wrong, because its only show it as text, its not encrypting into he field. Could you maybe show me a sample in an INSERT query?
Xerpher
New php-forum User
New php-forum User
 
Posts: 164
Joined: Tue Aug 27, 2002 8:25 pm
Location: Ontario, Canada

Postby DoppyNL » Wed Oct 02, 2002 10:22 pm

Code: Select all
insert into mytable values("some normal field",password("yourepassword"));


Greetz Daan
DoppyNL
 

Postby Xerpher » Thu Oct 03, 2002 4:31 am

Thanks, stupid me... I was doing it like this:

Code: Select all
insert into mytable values("some normal field",'password("yourepassword")');
Xerpher
New php-forum User
New php-forum User
 
Posts: 164
Joined: Tue Aug 27, 2002 8:25 pm
Location: Ontario, Canada


Return to mySQL & php coding

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron