The discussion about encode/decode vs. crypt was most helpful and I'm ALMOST there, but...

Using the commands from mysql command line works fine but within PHP I keep getting error messages about call to undefined or unsupported function. What syntax does this use? I have tried mysql_query but I'm not really updating a field.

The situation is:
Have encoded word in the database.
Have form on web page with text box named "CodeWord" which the user must fill out.
The two will be compared before granting access to a particularly sensitive page (credit card numbers). This is a 'belt and suspenders' safeguard AFTER the PHP_AUTH_USER routine, which protects the entire administrative back-end.

It seemed like a good idea to encode the input from the form element, assign it to a variable, fetch the Blob from the database, assign it to a variable, compare the two variables, if-else style. Well, it seemed like a good idea about 8 hours ago.. My handy-dandy PHP manual doesn't have information about the encode function either. So, bottom line, can I use these functions within PHP and, if so, HOW? (Arrgh)

Sort of along this same line but a different issue: I would like to have a chron file that automatically gets the whole order information table every x days, encrypts and archives it. (Horrors of the CD shop whose server got raided for ccnums and held ranson are keeping me awake at night). I was thinking of a unix cron for login into mysql, select db, Select Table into Outfile, encrypt, save as newfile. Has anyone done anything similar? Is there some overwhelmingly obvious reason this won't work (before I bang my head against a brick wall yet again) Any thoughts, suggestions, improvements are WELCOMED.

As always, thanks everyone..



------------------
Thanks for the help.
ebryan@lumenet.com