close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

error in contact form - can't work it out

Thread began 6/09/2010 8:40 am by CraigR | Last modified 6/09/2010 11:55 am by CraigR | 981 views | 6 replies

Jason ByrnesWebAssist

using "if($_POST)" is not a very reliable way to check if the form was posted.

$_POST is a supper global that contains an array of the posted elements. it exists whether a form is posted or not. If a form was not posted, it's an empty array, but it still exists. "if($_POST)" will pretty much always return true.

as a test, put the following on a blank page:

<?php echo($_POST); ?>

this will return:

to test for a form post use "if($_SERVER["REQUEST_METHOD"] == "POST")" instead

so the elseif statement at line 210 becomes:

elseif ($_SERVER["REQUEST_METHOD"] == "POST" && !$mailSent) {

If that doesn't help the issue, then please send a copy of the CSSMenuWriter/cssmw0/menu.php so I can examine the code.

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





Ease of use


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