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

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Empty fields??

Thread began 8/02/2010 3:34 am by biesheuvel378713 | Last modified 8/02/2010 2:53 pm by Jason Byrnes | 723 views | 6 replies |

biesheuvel378713

Error message

I sometimes get this errormesage:

Warning: Cannot modify header information - headers already sent by (output started at /home/meindert/domains/mrbjquery.nl/public_html/contact.php:5) in /home/meindert/domains/mrbjquery.nl/public_html/WA_ValidationToolkit/WAVT_Scripts_PHP.php on line 71

This happens most times if I turn of Javascript (and so client side validation) and try to post the form with empty fields

Attached Files
contact.zip
Sign in to reply to this post

biesheuvel378713

sorry redundant

Sign in to reply to this post

Jason ByrnesWebAssist

the error is occurring as a result of the blank line between php tags at line 4:

3: <?php require_once("php/mimemailer.php"); ?>
4:
5: <?php



delete the blank line at line 4.

Sign in to reply to this post

biesheuvel378713

Thank you, the form doesn't give any error message again.

Why is it so important to delete the empty line?

Then I have another question, when I turn of javascript in the browser (FF) the form validates correctly, but when I press submit it still posts. I still get an empty e mail on my server.

If tried to overcome this with the following line:

if ($WAFV_Errors == ""){

//post email

}

Somewhere I'm missing the point I guess?

Thanks in advance...

Attached Files
contact.zip
Sign in to reply to this post

Jason ByrnesWebAssist

to sent the email you have the following code:
<?php
if ($WAFV_Errors == ""){
mail("meindert@mrbjquery.nl","response to website",$_POST['Bericht'],"From: ".$_POST['email']);
}

?>


the $WAFV_Errors array will be blank when the page loads. You should use the following to trigger the email:
<?php
if (isset($_POST["Default_submit"])) {
mail("meindert@mrbjquery.nl","response to website",$_POST['Bericht'],"From: ".$_POST['email']);
}

?>

so it will only trey to send the email if the form is submitted.

Sign in to reply to this post

biesheuvel378713

Thanks this worked.

Am I pointing at the right direction that if a form would validate wrong the function PostResult saves the form values to the session. Then redirects to the page again with and that if the querystring is set the form reads the errors again form the session. (I'm just interested)

Thanks again for the great support I get from web assist. I'm still new to php but the products get me up and going fast and it really motivates me. Whenever somebody asks I will gladly tell them....

Sign in to reply to this post

Jason ByrnesWebAssist

then form values are stored in the validated entries collection.

this collection does not get created if the form passes validation, but if it does not pass validation, the validated entries collection is created and used for the form values.

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