close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

SHA1 encrypt password field

Thread began 12/18/2011 1:11 pm by steelace396915 | Last modified 12/19/2011 6:55 am by steelace396915 | 3923 views | 5 replies

steelace396915

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.

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...