View Single Post
  #10  
Old 15th August 2011, 22:13
new new is offline
Junior Member
 
Join Date: Aug 2011
Posts: 4
Thanks: 4
Thanked 0 Times in 0 Posts
Default

@Mark_NL ... I do not follow you

How do I use "INSERT" ENCRYPT password .... in my php registration (exec.php)???

Since Falko's tutorial teach how to do it in "MySQL Terminal" adding by direct way a ENCRYPT function, but... I really don't know how to make "apply" that funtion in order to get it work..

e.g >>> if in exec.php I use:
PHP Code:
INSERT INTO users(emailpassword, ..., ...) VALUES('$Umail','" CRYPT($_POST['password'])."','...''...')
It works.. but crypt() funtions insert password ok, but don't let (IMAP) read back the pass as "encrypted", neither pure-ftp...

Don't know if I explain this issue the corrected way, but I just ask "please", to someone let me know: how to insert users password From a web based php, into my users DB table, as I do From MySQL terminal (like Falko's tutorial said)... how to Insert from my web based registration (exec.php) :

INSERT INTO users(email, password, ..., ...) VALUES('$Umail', '"what_do_I_place_here_to_match_encrypt_funtion_like _tutorial_said ($_POST['password'])."','...', '...')";

Sorry my ignorance, and thanks a lot.

Regards

PD:

Little back ground to clear up my comments:

I did follow Falko's tutorial "virtual-users-and-domains-with-postfix-courier-mysql-and-squirrelmail-ubuntu-10.10".. but about "page 4", in chapter 13 >>> "Populate The Database And Test", using "... MySQL shell", wich I have done that part with not problem at all.

So, how do I use (ENCRYPT) value on a registration_form.php (register.php) that match what I do in MySQL shell..?

I collect user user name, and password info from register.php >>> ... and procces/insert that info through a php script named exec.php

How do I use "INSERT" ENCRYPT password .... in (exec.php) ???... where:

INSERT INTO users(..., password) VALUES('...','" CRYPT($_POST['password']))" <<< (no work, squirrelmail don't recognize the encrypted pass)
INSERT INTO users(..., password) VALUES('...','" ENCRYPT($_POST['password']))" <<< (no work, "php error said that ENCRYPT" function is not recognize as a valid)

Regards

Last edited by new; 16th August 2011 at 00:37.
Reply With Quote