I created a script today but keep getting this error:
Parse error: parse error, unexpected T_BOOLEAN_OR, expecting ',' or ')' in /home/yourinf/public_html/sendmail.php on line 8
Can someone please look at my script and suggest way's to fix or improve? Thank you very much.
<?PHP
$name = $_REQUEST['first name'] ;
$email = $_REQUEST['email address'] ;
$state = $_REQUEST['state or country'] ;
$message = $_REQUEST['message'] ;
if (!isset($_REQUEST['email'] || ['name'] || ['state'])){
header( "Location: http://www.example.com/error.html" );
}
elseif (empty($name)) || (empty($email)) || (empty($state)) || (empty($message)) {
header( "Location: http://www.yourinfodomain.com/error.html" );
else {
mail( "kwenterprise******.com", "YourInfo Comments",
$message, "From: $email" );
header( "Location: http://www.yourinfodomain.com/thankyou.html" );
}
?>
Parse error: parse error, unexpected T_BOOLEAN_OR, expecting ',' or ')' in /home/yourinf/public_html/sendmail.php on line 8
Can someone please look at my script and suggest way's to fix or improve? Thank you very much.
<?PHP
$name = $_REQUEST['first name'] ;
$email = $_REQUEST['email address'] ;
$state = $_REQUEST['state or country'] ;
$message = $_REQUEST['message'] ;
if (!isset($_REQUEST['email'] || ['name'] || ['state'])){
header( "Location: http://www.example.com/error.html" );
}
elseif (empty($name)) || (empty($email)) || (empty($state)) || (empty($message)) {
header( "Location: http://www.yourinfodomain.com/error.html" );
else {
mail( "kwenterprise******.com", "YourInfo Comments",
$message, "From: $email" );
header( "Location: http://www.yourinfodomain.com/thankyou.html" );
}
?>
Comment