close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Server Validation if Recordset not empty

Thread began 2/21/2012 2:36 pm by toni272059 | Last modified 5/27/2014 7:45 am by toni272059 | 13746 views | 14 replies

toni272059

Thanks, that worked for one group but not the other

There are actually three options for embroidery (select menus show relevant options by product)
-- plain (no embroidery)
-- embroidery with $15 surcharge
-- embroidery with price included in product price

The $15 surcharge OR price included is option #2 in their respective select lists (either way customer has to make embroidery selection). Plain (no embroidery) always being #1

For some reason the $15 surcharge menu item works with the validation
product_detail.php?ProductID=1

The price included does not, validation is ignored.
product_detail.php?ProductID=13

<?php
if (isset($_POST["eCart1_1_ATC_x"])) {
$WAFV_Redirect = "";
$_SESSION['WAVT_productdetail_366_Errors'] = "";
if ($WAFV_Redirect == "") {
$WAFV_Redirect = $_SERVER["PHP_SELF"];
}
$WAFV_Errors = "";
$WAFV_Errors .= WAValidateRQ(((isset($_POST["eCart1_1_Color_Add"]))?$_POST["eCart1_1_Color_Add"]:"") . "",true,1);
if ($totalRows_rsEmbroidery > 0) {
$WAFV_Errors .= WAValidateRQ(((isset($_POST["eCart1_1_Embroidery_Add"]))?$_POST["eCart1_1_Embroidery_Add"]:"") . "",true,2);
}
if (isset($_POST["eCart1_1_Embroidery_Add"]) && $_POST["eCart1_1_Embroidery_Add"] == "2") {
$WAFV_Errors .= WAValidateRQ(((isset($_POST["eCart1_1_EmbroideryType_Add"]))?$_POST["eCart1_1_EmbroideryType_Add"]:"") . "",true,3);
$WAFV_Errors .= WAValidateRQ(((isset($_POST["eCart1_1_embroiderystyle_Add"]))?$_POST["eCart1_1_embroiderystyle_Add"]:"") . "",true,4);
$WAFV_Errors .= WAValidateRQ(((isset($_POST["EmbroideryText"]))?$_POST["EmbroideryText"]:"") . "",true,5);
}
if ($WAFV_Errors != "") {
PostResult($WAFV_Redirect,$WAFV_Errors,"productdetail_366");
}
}
?>

Could it be related to the database table options.Options ID?
Plain is 1
+$15 is 2
Included is 12

I did try changing == "2" to >= "2" but that messed with the Plain #1 option, causing the embroidery selection validation to activate again

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