Hi. I’m new to PHP and am trying to use it to handle a form request on a test website I’m building. The address of the HTML form is [url]http://swweb.frih.net/request.html
[code]
<?
$cusref = $_REQUEST[‘cusref’] ;
$contactname = $_REQUEST[‘contactname’] ;
$tel = $_REQUEST[‘tel’] ;
$email = $_REQUEST[’email’] ;
$rdate = $_REQUEST[‘rdate’] ;
$rtime = $_REQUEST[‘rtime’] ;
if (!isset($_REQUEST[’email’])) {
header( “Location: request.html” );
}
[COLOR=”Red”]elseif (empty($email) || empty($tel)) || empty($rdate)) || empty($rtime)) || empty($contactname)) || empty($cusref)) {[/COLOR]
?>
<html>
<head><title>Error</title></head>
<body>
<h1>Error</h1>
<p>
Not all field have been filled in. Please try again.
</p>
</body>
</html>
<?
}
else {
mail( “$email”, “Collection order confirmation”,
“From: Phones 4 Charity” ), “Customer Reference: $cusref”, “Contact Name: $contactname”, “Telephone: $tel”, “Requested Date: $rdate”, “Requested Time: $rtime” ;
header( “Location: thanks.html” );
}
?>
Many thanks in advance
[b]EDIT
I see what I’ve done now. I’ve doubled up on brackets/parenthesis. Is the below correct?
[COLOR=Red]elseif (empty($email) || empty($tel) || empty($rdate) || empty($rtime) || empty($contactname) || empty($cusref)) {