close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Validation Conundrum

Thread began 4/29/2010 12:58 pm by er777402591 | Last modified 4/30/2010 10:16 am by Jason Byrnes | 866 views | 1 replies |

er777402591

Validation Conundrum

I am attempting server validation on a simple form (registration.php) that posts to thank_you.php. The items needed to server validate are only email and user name.

It seems logical that you must have a pair of items to validate against each other - a local form value and a value existing in a corresponding field on the database. But in my case, I do not get the option of both - only one shows up in the sequence I have carefully followed in the instructions.

As I use the tool, the session variable list presented as my first choice contains:

1) WA Cookies <?php echo((isset($_COOKIE[""]))?$_COOKIE[""]:"") ?>
email <?php echo((isset($_COOKIE["email"]))?$_COOKIE["email"]:"") ?>
password <?php echo((isset($_COOKIE["password"]))?$_COOKIE["password"]:"") ?>
remember <?php echo((isset($_COOKIE["remember"]))?$_COOKIE["remember"]:"") ?>

2) Session <?php echo $_SESSION['']; ?> or
<?php echo $_SESSION['WADbSearch1_user_Results']; ?> or
<?php echo $_SESSION['WADA_Insert_user']; ?> or
<?php echo $_SESSION['WADbSearch1_questions_Results']; ?> or
<?php echo $_SESSION['WADA_Insert_questions']; ?>

3) Cookie <?php echo $_COOKIE['']; ?> or
<?php echo $_COOKIE['email']; ?> or
<?php echo $_COOKIE['password']; ?> or
<?php echo $_COOKIE['remember']; ?>

I have chosen "like entry" validation.

But when I am asked to present the next entry ( by clicking the + sign ) in the 'choose a variable to trigger validation) all the options are exactly the same, and I am not sure what to present to validate against the first choice. (I am not even sure what the first choice should have been...)

As I said, all I want to do is validate the username and email against what is already in the database.

Can you help me out? Thanks so much!

Eddie

Sign in to reply to this post

Jason ByrnesWebAssist

in the case of a registration form, you would want to validate that the email has not been registered before.

To make sure the email has not been used before, you would need to create a recordset to filter the email column on the email form element from the form collection ion the bindings panel.


name the recordset 'emailLookup'.


In validation toolkit, use number validation, set the server variable to:
$totalRows_emailLookup

Click the plus button, and in the number validation settings, set the minimum number to -1 and the max to 0. this will validate that the emailLookup recordset is empty.

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