Menu
I’m trying to add code to a formmail program to require the user to fill in the your_name, phone, and email fields but I don’t know how to format the code correctly in php. Can anyone show me what I need to change?
[code]
$valid_form = true;
if(isset($_POST[‘your_name’]) && empty($_POST[‘your_name’]))
or
if(isset($_POST[‘phone’]) && empty($_POST[‘phone’]))
or
if(isset($_POST[’email’]) && empty($_POST[’email’]))
{
$valid_form = false;
}
if(valid_form)
header(“Location: http://yourdomain.com/thankyou.html”);
else header(“Location: http://yourdomain.com/error.html”);
Thanks.