SHA1 encrypt password field
Hi
I have a quick question and probably a very easy one to answer! I have a wizard generated set of pages made in DataAssist. Everything works well but one thing! I've tried to set the password field in the insert records behaviour to be encrypted to SHA1 when written to database! I followed the guides available and I can't understand what is wrong. I can insert all fileds in the form correctly as long as I don't choose any encryption. I know how to encrypt the data when it's written to the MySQL database from PHPmyadmin but I want it to happen automatically on insert! Could someone please tell me what code has to go in the insert record server behaviour for this to happen!??
I've tried the following in the insert record behaviour for the password form field:
<?php echo WA_SHA1Encryption(((isset($_POST["UserPassword"]))?$_POST["UserPassword"]:"")) ?> (Does not work for me)
From the start the code is like follows and then the data is inserted correctly in database but not encrypted:
<?php echo ((isset($_POST["UserPassword"]))?$_POST["UserPassword"]:""); ?> (This works with no encryption)
/Martin J.
PS I have a 100 varchar field in database for the password so that's not the problem.