Heres my code, I cant seem to figure it out, It keeps giving me error on line 26.
<?php
$errors = '';
$myemail = '[email protected]';//<-----MY EMAIL IS HIDDEN.
if(empty($_POST['Username']))
{
$errors .= "\n Error: username field required";
}
if( empty($errors))
{
$name = $_POST['Username'];
$selection= $_POST['os0'];
$royalty = $_POST['Request_Royalty'];
$to = $myemail;
$email_subject = "Contact form submission: $name";
$email_body = "You have received a new request. ".
" Here are the details:\n Name: $name \n Selection: $selection\n Royalty Tag\n $royalty ";
$headers = "From: $myemail";
$headers .= "Reply-To: $email_address";
mail($to,$email_subject,$email_body,$h...
//redirect to the 'thank you' page
header('Location: form-thank-you.html');
}
?> // THIS IS LINE 26.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>ERROR in form handler</title>
</head>
<body>
<!-- This page is displayed only if there is some error -->
<?php
echo nl2br($errors);
?>
</body>
</html>
<?php
$errors = '';
$myemail = '[email protected]';//<-----MY EMAIL IS HIDDEN.
if(empty($_POST['Username']))
{
$errors .= "\n Error: username field required";
}
if( empty($errors))
{
$name = $_POST['Username'];
$selection= $_POST['os0'];
$royalty = $_POST['Request_Royalty'];
$to = $myemail;
$email_subject = "Contact form submission: $name";
$email_body = "You have received a new request. ".
" Here are the details:\n Name: $name \n Selection: $selection\n Royalty Tag\n $royalty ";
$headers = "From: $myemail";
$headers .= "Reply-To: $email_address";
mail($to,$email_subject,$email_body,$h...
//redirect to the 'thank you' page
header('Location: form-thank-you.html');
}
?> // THIS IS LINE 26.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>ERROR in form handler</title>
</head>
<body>
<!-- This page is displayed only if there is some error -->
<?php
echo nl2br($errors);
?>
</body>
</html>