Form validation problem

I’m using Godaddy’s gdform.php form mailer for my forms. The forms work perfectly except the validation. I need the visitors to fill in the fields and then submit the information to my email, but the problem is that everyone can submitt even if he doesn’t fill in the form. I want all of the fileds to be required. Is there something wrong with the code ? Here it is :

Your Name:

Your E-mail:

Your Message:


You have no code there to implement validation that I see.

Here is my form script :

Your Name:

Your E-mail:

Your Message:


And here the gdform.php script :

<?php $request_method = $_SERVER["REQUEST_METHOD"]; if($request_method == "GET"){ $query_vars = $_GET; } elseif ($request_method == "POST"){ $query_vars = $_POST; } reset($query_vars); $t = date("U"); $file = $_SERVER['DOCUMENT_ROOT'] . "/../data/gdform_" . $t; $fp = fopen($file,"w"); while (list ($key, $val) = each ($query_vars)) { fputs($fp,"\n"); fputs($fp,"$val\n"); fputs($fp,"\n"); if ($key == "redirect") { $landing_page = $val;} } fclose($fp); if ($landing_page != ""){ header("Location: http://".$_SERVER["HTTP_HOST"]."/$landing_page"); } else { header("Location: http://".$_SERVER["HTTP_HOST"]."/"); } ?>

The user can fill in any, all, or none of the fields and submit. Does anyone know how to edit the gdform.php code so it doesn’t pass empty fields ?