Jump to content

registration script help needed


Warrior19

Recommended Posts

Hello, im new to this forums, im sorry if this is wrong section. [img src=\"style_emoticons/[#EMO_DIR#]/smile.gif\" style=\"vertical-align:middle\" emoid=\":smile:\" border=\"0\" alt=\"smile.gif\" /]

I want to make a script in php that what the user writes for the password gets converted to md5 value and inserted into database table = varbinary.

Example:

Username: user1

Password userpw

userpw = gets converted to md5 (varbinary)

and get inserted into the mssql database.

[b]i already tryed this: [/b]

$password = stripslashes($_POST['pw']);
$enc = md5($password);
$finalpw = "enc";

and didnt worked, maybe was me that did it wrong, and code is wrong. im still a noobie :)

thank you, i hope you understand what im trying to do.
Link to comment
https://forums.phpfreaks.com/topic/10821-registration-script-help-needed/
Share on other sites

[!--quoteo(post=378596:date=May 31 2006, 12:11 AM:name=EKINdesigns)--][div class=\'quotetop\']QUOTE(EKINdesigns @ May 31 2006, 12:11 AM) [snapback]378596[/snapback][/div][div class=\'quotemain\'][!--quotec--]
i am not sure why you would do a strip slashes. There shouldnt be any quotes in the password.
This is how i would do it:

[code]$password = mysql_escape_string(htmlentities($_POST['pw']));
$finalpw = md5($password);
[/code]
Enjoy!
[/quote]
im not using mysql im using mssql would it still work?

Archived

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

×
×
  • Create New...

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.