Apache2Triad Help, Support and Development Forum Index Search Profile Log in to check your private messages Log in Register Memberlist Attachments Statistics Crew/Ranks Archive
 SQL Password Function help
Google
Post new topic Reply to topic
Author Message
mseerob
 
 


Joined: 06 Nov 2005
Posts: 8

PostPosted: Mon Nov 07, 2005 5:06 am Reply with quoteBack to top

Hey users...

I downloaded a php login suite from this website.. http://www.phploginsuite.co.uk/ Basically I created a client registration page using the macromedia server behaviour. I use dreamweaver mx 2004. Anyways I downloaded the manual from that website and it said that in order to login with the encrypted password, the password has to be encrypted using the SQL Password Function in order to login successfully. Now my problem is.. When I use the md5 function, Im not able to login. and the crypt function doesnt work either. So what function should I use so as soon as the client register there account, it encrypts it using the SQL Password Function and the client is able to login right away...

Im asking here because on that support forums... well there is not support, I even emailed the guy and they didnt reply back. there the worst support I have ever had. I hope someone on this board can tell me that function is the SQL Password function...
View user's profileSend private message
Vlad Alexa Mancini
lead developer
lead developer


Joined: 07 Jul 2003
Posts: 1539

PostPosted: Mon Nov 07, 2005 9:09 am Reply with quoteBack to top

the sql password function is not md5 or crypt , it is quite literally PASSWORD() , and is to be used inside the sql query , example

Code:
mysql> SET PASSWORD FOR 'newuser'@'newhostname' = PASSWORD('newpass');
View user's profileSend private message
mseerob
 
 


Joined: 06 Nov 2005
Posts: 8

PostPosted: Mon Nov 07, 2005 3:53 pm Reply with quoteBack to top

Im using the server behaviours in dreamweaver for inserting records. How can I incorpae the SQL Password Function into something like this..

if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
$insertSQL = sprintf("INSERT INTO clients (userlevel, firstname, lastname, username, password, country, homeaddress, city, state_province, zip_postalcode, telephonenumber, cellphonenumber, faxnumber, emailaddress, dateregistered, referral, receievepromotions) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
GetSQLValueString($_POST['userlevel'], "text"),
GetSQLValueString($_POST['firstname'], "text"),
GetSQLValueString($_POST['lastname'], "text"),
GetSQLValueString($_POST['username'], "text"),
GetSQLValueString($_POST['password'], "text"),
GetSQLValueString($_POST['country'], "text"),
GetSQLValueString($_POST['homeaddress'], "text"),
GetSQLValueString($_POST['city'], "text"),
GetSQLValueString($_POST['state_province'], "text"),
GetSQLValueString($_POST['zip_postal_code'], "text"),
GetSQLValueString($_POST['telephonenumber'], "text"),
GetSQLValueString($_POST['cellphone_number'], "text"),
GetSQLValueString($_POST['faxnumber'], "text"),
GetSQLValueString($_POST['emailaddress'], "text"),
GetSQLValueString($_POST['date_registered'], "text"),
GetSQLValueString($_POST['referral'], "text"),
GetSQLValueString($_POST['promotion'], "text"));
View user's profileSend private message
Vlad Alexa Mancini
lead developer
lead developer


Joined: 07 Jul 2003
Posts: 1539

PostPosted: Tue Nov 08, 2005 5:57 am Reply with quoteBack to top

try
Code:
$insertSQL = sprintf("INSERT INTO clients (userlevel, firstname, lastname, username, password, country, homeaddress, city, state_province, zip_postalcode, telephonenumber, cellphonenumber, faxnumber, emailaddress, dateregistered, referral, receievepromotions) VALUES (%s, %s, %s, %s, PASSWORD(%s), %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
View user's profileSend private message
mseerob
 
 


Joined: 06 Nov 2005
Posts: 8

PostPosted: Tue Nov 08, 2005 3:48 pm Reply with quoteBack to top

It worked! Thanks man I appreciate it greatfully!
View user's profileSend private message
Display posts from previous:      
Post new topic Reply to topic


 Jump to:   



View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum
Powered by phpBB © 2001, 2002 phpBB Group :: FI Theme
All times are GMT