I'm developing my website with BlueVoda, and I added a "contact form" with a Thankyou.php page:
So, my contact form & Thankyou page work perfectly, I receive the feedback from my visitors... the problem (there's always one, huh?) is that I need to "validate" the form, that is to say, to have a little piece of code able to check the three fields (name, email, comments) before sending me an empty email, to prevent what now happens: email account collapsed with empty emails...
And I know nothing about php scripting, so I should not "touch" any code provided by BlueVoda & Forum Members working as is...
Can anyone help me, please...? I just need to stop empty emails collapsing my account with the same structure I have now (no more pages):
+ Contact.html (contains the basic form and sends it to process it through Thankyou.php)
+ Thankyou.php (contains the php code provided below and a Thank You message)
$email = $HTTP_POST_VARS[email];
$mailto = "email@example.com";
$mailsubj = "Envío de Formulario de Contacto";
$mailhead = "From: $email\n";
$mailbody = "Valores enviados desde el formulario de contacto :\n";
while (list ($key, $val) = each ($HTTP_POST_VARS))
$mailbody .= "$key : $val\n";
mail($mailto, $mailsubj, $mailbody, $mailhead);
Thank you in advance and, please, forgive my english, I'm not an english native speaker!