...

View Full Version : Contact form is being sent- blank!



KELS!
01-06-2007, 09:48 PM
I created a pretty basic PHP form for my Dad's website, and it's working great. The only problem is that whenever someone sends in the form, 2 or three BLANK copies are sent after it.

The only reason I can think of is because people are refreshing the process.php page. Is there a code I can use to make sure the form isn't sent to me blank all the time?

Page with form:
http://www.qualitygrainservices.com/other/contact.php

Process Page:
http://www.qualitygrainservices.com/other/process.php

Thanks very much!
-Kelsie

Mwnciau
01-06-2007, 11:10 PM
Before you process the form you can check if its empty or not, eg.


if(!empty($_POST['form'])){
// process the form
}

// OR

if(strlen($_POST['form']) > 0){
// process the form
}

whizard
01-06-2007, 11:58 PM
Before you process the form you can check if its empty or not, eg.

PHP Code:
if(!empty($_POST['form'])){
// process the form
}

// OR

if(strlen($_POST['form']) > 0){
// process the form
}


Or

if(isset($_POST['submit']))
{
//process the form
}
for that matter..

Can we see your code?

Dan



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum