View Full Version : Some values not comming up. plz help

08-06-2007, 09:44 PM
I'm testing my action pages and i realized that some values are coming blank. for example, phone number,r second phone and email.

this is the form's page:

and this the PHP code:

$mailto = "seniorhelpers******.com";
$email = $HTTP_POST_VARS['email'];
if ($email == "") {
$email = $mailto;
$mailsubj = "Client Submission Form";
$mailhead = "From: $email\n";
reset ($HTTP_POST_VARS);
$mailbody = "Values submitted from web site form :\n";
while (list ($key, $val) = each ($HTTP_POST_VARS))
if ($key!="submit")
$mailbody .= "$key : $val\n";
mail($mailto, $mailsubj, $mailbody, $mailhead);

what is missing? thanks!

08-06-2007, 10:43 PM
Check your form. The script has nothing to do with this

08-07-2007, 03:15 PM
yes, i checked it, but this is the code i have in the action page that is related to the link i posted... i did a test and i get the action page as needed, but some fields are blank. that is why i pasted the code, because something there is missing and i dont know what it is...

08-07-2007, 05:56 PM
Your problem is that some fields have the same name: name and last name in example, are both "name".

Phone number and second number: all six fields are "phone".

Gender field is named relationship, as the real relationship field, etc.

EACH field MUST have it's own name, otherwise you will only receive one value for all the fields named the same way.