close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

SecurityAssist registration page not validating correctly

Thread began 9/11/2021 5:57 pm by Rob | Last modified 9/22/2021 5:37 pm by Ray Borduin | 35 views | 7 replies |

Rob

SecurityAssist registration page not validating correctly

Hello,

I used SecurityAssist to Create Security Pages with the wizard. A few strange things happened with the registration page:

1) The post variables were not set correctly for two of the fields in the Insert Record behavior. This was easy enough to fix by clicking on the behavior in the panel and correctly setting the bindings manually.

2) The bigger issue is that the form validation is not working correctly. When I attempt to register twice with the same email address and/or scout name (which is not allowed), it still redirects to my success page without any warnings or notes even though it does not enter data into the database. Right now I have it hooked up to a simple page that echos the email, scout name and hometown by taking the session variable that should be set by the registration form and using it to create a recordset of that data. When this failure happens, I get a message that I have an error in my SQL syntax because I am assuming that the session variable has been unset.

I am attaching the php file that was generated for the registration page. Any help would be greatly appreciated!

Thank you!

Attached Files
index.php
Sign in to reply to this post

Ray BorduinWebAssist

This looks like it should work. Please send a url and FTP access for testing and I'll be able to debug it and figure out why the validation isn't working properly.

Sign in to reply to this post
Did this help? Tips are appreciated...

Rob

Thanks - sending now.

Sign in to reply to this post

Ray BorduinWebAssist

The issue was with the key value being set to the session variable value in the server validation.

That setting is only used on update pages to allow the user to set the same value of their existing record, since it is getting overwritten anyway.

In your case the second registration was being allowed with the same email because the validation thought that was the record being overwritten, so it allowed it to pass.

The error was an invalid duplicate key error when the insert tried to process.

I fixed the problem by updating the server validations unique database value server behaviors and set the Key value to 0 (zero) since that will never exist. That is the right way to use it on insert pages.

Sign in to reply to this post
Did this help? Tips are appreciated...

Rob

Thank you so much for your help!

Sign in to reply to this post

Rob

Thank you for your help! I think Dreamweaver accidentally overwrote what you did when I synced my local files because I still get the same error. Please let me know where I can find this server validations unique database value in the code so that I can set the key value to 0.

Sorry for the trouble and thanks again!

Sign in to reply to this post

Ray BorduinWebAssist

Just go to the server behaviors panel and click on your Server Validations server behavior. Then select the unique value validation from the list and click edit. You should see the unique id value field there and can update it to zero.

If you can't find it, please attach the page you are working on and I can tell you the line of code that needs to be updated.

Sign in to reply to this post
Did this help? Tips are appreciated...

Rob

Thank you!

Thanks, Ray - I think I found it and it seems to be working now. I appreciate your help!

Sign in to reply to this post

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...