close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

how to clear server validation

Thread began 3/11/2013 1:13 pm by randyw2394710 | Last modified 3/11/2013 2:28 pm by Jason Byrnes | 869 views | 5 replies |

randyw2394710

how to clear server validation

i have a page which shows success or fail using validation
-------------------------------------------------------
<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$WAFV_Redirect = "";
$_SESSION['WAVT_choosegallery_796_Errors'] = "";
if ($WAFV_Redirect == "") {
$WAFV_Redirect = $_SERVER["PHP_SELF"];
}
$WAFV_Errors = "";
$WAFV_Errors .= WAValidateRQ(((isset($_POST["addGallery"]))?$_POST["addGallery"]:"") . "",false,1);
$WAFV_Errors .= WAValidateUnique("PowerCMSConnection",$PowerCMSConnection,$database_PowerCMSConnection,"gallery","galleryName","',none,''","0","galleryName","',none,''","".(((isset($_POST["addGallery"]))?$_POST["addGallery"]:"")) ."",true,2);

if ($WAFV_Errors != "") {
PostResult($WAFV_Redirect,$WAFV_Errors,"choosegallery_796");
}
}
?>
-----------------------------------------------------------------
<?php
if ("".((isset($_POST["addGallery"]))?$_POST["addGallery"]:"") ."" != "".$row_gallery_insert['galleryName'] ."") { // WebAssist Show If
?>
<div id="success"> Success That gallery ( <?php echo $row_gallery_insert['galleryName']; ?> ) has been created</div>
<?php
if (ValidatedField('choosegallery_796','choosegallery_796')) {
if ((strpos((",".ValidatedField("choosegallery_796","choosegallery_796").","), "," . "2" . ",") !== false || "2" == "")) {
if (!(false)) {
?>
<div id="error">Error, that gallery ( <?php echo $row_gallery_insert['galleryName']; ?> ) allready exists!</div>
<?php //WAFV_Conditional choose_gallery.php choosegallery_796(2:)
}
}
}?>
<?php
} // ("".((isset($_POST["addGallery"]))?$_POST["addGallery"]:"") ."" != "".$row_gallery_insert['galleryName'] ."")
?>
<?php
if (ValidatedField('choosegallery_796','choosegallery_796')) {
if ((strpos((",".ValidatedField("choosegallery_796","choosegallery_796").","), "," . "1" . ",") !== false || "1" == "")) {
if (!(false)) {
?>
<div id="error"> Error, you must at least enter a gallery name. <br />
You can edit the comment for the gallery later!</div>
<?php //WAFV_Conditional choose_gallery.php choosegallery_796(1:)
}
}
}?>
--------------------------------------------------------------------
how do i not have them show when add button is pressed or the user goes to new page then back to that page

Sign in to reply to this post

Jason ByrnesWebAssist

i dont understand the question, please provide more details.

Sign in to reply to this post

randyw2394710

how do i not have divs show when a user clicks on add gallery or if the user goes to a new page then back to that page i want the divs to go away

Sign in to reply to this post

Jason ByrnesWebAssist

  how do i not have divs show when a user clicks on add gallery  



what div should show in this case?

  or if the user goes to a new page then back to that page i want the divs to go away  



what div should not show in this case?

Sign in to reply to this post

randyw2394710

oh sorry i want all divs error (both error messages) and success to display none on both add button pressed and page refresh

Sign in to reply to this post

Jason ByrnesWebAssist

add the following code at the end of the page:

[/php]<?php if(isset($_SESSION['WAVT_choosegallery_796_Errors'])) unset($_SESSION['WAVT_choosegallery_796_Errors']); ?>[/php]

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