|
 |
|
|
03-21-2007, 05:32 PM
|
AES Query...
|
Posts: 46
|
PHP Code:
$ssnpost = $_POST['ssn'];
$query = "INSERT INTO ".MYSQL_TBL_CLIENTS." SET $query_string, ssn='aes_encrypt('$ssnpost','$aes_key')', advisor='$advisor_id', lastupdate=NOW(), date_referral=NOW()";
Why isn't this working? If I remove the ssn='ae......', section, it works fine. Any solutions?
|
|
|
|
03-21-2007, 05:49 PM
|
Re: AES Query...
|
Posts: 5,662
Name: John Alexander
|
Is it possible there are quote marks ( or some other special character ) in either your $ssnpost or $aes_key variables?
|
|
|
|
03-21-2007, 05:55 PM
|
Re: AES Query...
|
Posts: 46
|
$ssnpost = $_POST[ssn];
$aes_key = "whateveritis";
If that counts for aes_key.. although I have a AES_DECRYPT function that works with the code like that.
|
|
|
|
03-21-2007, 06:06 PM
|
Re: AES Query...
|
Posts: 46
|
If I put a mysql die error in, I get the column 'ssn' is specified more than once.. but I don't know why it would be. Thanks for the help.
|
|
|
|
03-21-2007, 06:31 PM
|
Re: AES Query...
|
Posts: 46
|
Ok, I went back in and deleted the $query_string mess, and used the origional syntax () values ()...
Now, when I try to post, I get this error:
Quote:
|
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' 12224, , 1, 1, 2007, aes_encrypt('12345','removedkey' at line 1
|
This is my query
PHP Code:
$query = "INSERT INTO ".MYSQL_TBL_CLIENTS." (fname, lname, address1, address2, city, state_code, zip, county_code, dob_month, dob_day, dob_year, ssn, email, phone, phone_other, condition, working_currently, working_stop_month, working_stop_day, working_stop_year, ssi_applied, denied_benefits, denied_benefits_when_month, denied_benefits_when_day, denied_benefits_when_year, contact_time, client_comments, client_heard) values ($fname, $lname, $address1, $address2, $city, $state_code, $zip, $county_code, $dob_month, $dob_day, $dob_year, aes_encrypt('$ssnpost','$aes_key'), $email, $phone, $phone_other, $condition, $working_currently, $working_stop_month, $working_stop_day, $working_stop_year, $ssi_applied, $denied_benefits, $denied_benefits_when_month, $denied_benefits_when_day, $denied_benefits_when_year, $contact_time, $client_comments, $client_heard) SET advisor='$advisor_id', lastupdate=NOW(), date_referral=NOW()";
all of the $... have corresponding post variables earlier in the file, which is pretty long, so I didnt post it.
What the heck does that error mean?
|
|
|
|
|
« Reply to AES Query...
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|