close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Problems with Serverside Validations

Thread began 4/26/2010 10:04 am by martin400112 | Last modified 4/27/2010 3:01 pm by Jimmy Wu | 1272 views | 3 replies |

martin400112

Problems with Serverside Validations

Hi,
I'm having really problems trying to use the Serverside Validations for a file extension.

Here is what the code is showing me at the moment:

<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$WAFV_Redirect = "";
$_SESSION['WAVT_memformsInsert_455_Errors'] = "";
if ($WAFV_Redirect == "") {
$WAFV_Redirect = $_SERVER["PHP_SELF"];
}
$WAFV_Errors = "";
$WAFV_Errors .= WAValidateFE(((isset($_FILES["file_memform"]))? preg_replace('/^.*\./', '', $_FILES["file_memform"]["name"]) :"") . "",".pdf",true,2);

if ($WAFV_Errors != "") {
PostResult($WAFV_Redirect,$WAFV_Errors,"memformsInsert_455");
}
}
?>

I'm fairly green to all this, and followed all the instructions, plus searched the forums here, but the form will not allow me to upload anything at all with this validation added in.

Is there anything that anyone can see is wrong...??

Thanks for your help/

Sign in to reply to this post

Jimmy Wu

What extensions are you trying to validate for?

Sign in to reply to this post

martin400112

Hi Jimmy,
Thanks for your reply!
I'm unable to validate any extension - .jpg, .jpeg, .pdf, .doc, .docx....anything!

All that happens is the page trys to upload the file and then the page refreshes with blank form....nothing....

Thanks for your help,

Martin

Sign in to reply to this post

Jimmy Wu

So the way that server side validations work is that you apply it to the page that the form posts to. Then forward back to the form page if there are any validation errors. Then on the form page, you would apply the validation show if server behavior to display the error message. Is this how you've applied the server side validations?

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