close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Server validations not working as expected

Thread begun 6/13/2020 11:40 am by rogersds267040 | Last modified 6/17/2020 1:26 pm by Ray Borduin | 708 views | 4 replies |

rogersds267040

Server validations not working as expected

Hello,

I'm trying to check to see whether a user exists before inserting it to the database.

I have taken the below steps.

1: created a query that checks to see whether the user exit
2: Created a WA server validation
3: Created a Show If Validation
4: Also, updated other fields to ensure if values in others are entered and username exists, the data is still there and users don't have to input again.

What's happening is that it looks like the server validations work but;
1: Data in other fields are being cleared
2: The server validation message stays even though I clear the page or navigate away from the page.

What am I doing wrong? See attachment?

Sign in to reply to this post

Ray BorduinWebAssist

It looks like you have number validation on a blank value. You should be validating form element values.

The form element values on the page should be bound to the "validated field" bindings. You have them bound to the form post values.

Please correct those two issues and include a copy of the updated page in a reply if you continue to have issues.

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

rogersds267040

Thank you, Ray.

I did what you indicated but ran into another issue.

When I have the code, as is in the attachment, the validation works but the insert doesn't work when I put in a unique username. The page just refreshes.

Now, when I put the insert block of code above the Validation code which starts at Line 50, the insert works and my page breaks with a message that says, SQL error.

Sign in to reply to this post

Ray BorduinWebAssist

It looks like you have Numeric validation not Unique Value in Database validation set up for the username. I think you have the wrong type of validation set up. If you turn on Debug in your queryobj.php file it should give you a better message when the insert fails.

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

rogersds267040

Thank you Ray.
Made the changed and re-organized the insert and validation statements and it works.

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