Reply
PHP/MySQL Posting Query (with encryption) help
Old 04-17-2007, 06:17 PM PHP/MySQL Query help (UPDATED)
Experienced Talker

Posts: 46
Hello. Can someone help me with this?

Fatal error: Call to undefined function: aes_encrypt() in /home/user/public_html/application3t.htm on line 450

My Query:

Quote:
// insert into database
$query = "INSERT INTO ".MYSQL_TBL_CLIENTS." SET $query_string, ssn='".aes_encrypt($ssnpost, $aeskey)."', lastupdate=NOW()";

if (!mysql_query($query)) {
die(mysql_error());
}

$result = mysql_query($query);

# echo $query;
Always having trouble with this AES stuff What am I doing wrong?

Last edited by bld44 : 04-19-2007 at 09:51 PM.
bld44 is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 04-17-2007, 06:36 PM Re: PHP/MySQL Posting Query (with encryption) help
Novice Talker

Posts: 6
oops...

Last edited by hola : 04-17-2007 at 06:37 PM.
hola is offline
Reply With Quote
View Public Profile
 
Old 04-17-2007, 06:41 PM Re: PHP/MySQL Posting Query (with encryption) help
Skilled Talker

Posts: 61
Name: Daniel
Since its throwing back an undefined function error that means that the php engine cannot locate the function you're trying to use.

Make sure that the file containing the function is included before the query is done. Or that the function itself is posted up top.

Or make sure you dont do what I do and misspell something. I do that all the **** time.
castis is offline
Reply With Quote
View Public Profile
 
Old 04-17-2007, 06:43 PM Re: PHP/MySQL Posting Query (with encryption) help
tripy's Avatar
Fetchez la vache!

Posts: 2,057
Name: Thierry
Location: In the void
Seems pretty clear to me...
Quote:
Call to undefined function: aes_encrypt()
aes_encrypt is not a PHP function, but a mysql one.
You must not escape it.

Look what I've found as second result in google for "php aes_encrypt"
Quote:
Help with aes_encrypt/decrypt functions

OK, AES_ENCRYPT is a MySQL function, not PHP. > >>When I look in the table the field pword is a load of garbage so I assume ...
http://www.issociate.de/board/post/1...functions.html - 12k -

__________________
Listen to the ducky: "This is awesome!!!"

tripy is offline
Reply With Quote
View Public Profile
 
Old 04-17-2007, 08:04 PM Re: PHP/MySQL Posting Query (with encryption) help
Experienced Talker

Posts: 46
Right, ok. I removed all of the "'s, and the query works, but I get the error that column ssn is defined twice.

This is on a form where all the inputs are defined by a for each, then matched & placed in the database.

foreach ($_POST as $key=>$value) { ......

Since ssn would be defined in both the actual query and for each, how do I get it down to one?
bld44 is offline
Reply With Quote
View Public Profile
 
Old 04-18-2007, 08:29 PM Re: PHP/MySQL Posting Query (with encryption) help
Experienced Talker

Posts: 46
Bumping, can anyone help?
bld44 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to PHP/MySQL Posting Query (with encryption) help
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.15029 seconds with 12 queries