You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I am not too familiar with code and stuff but I have a website and a contact from, I used a template from bootstrap, I have added a few custom feilds such as drop downs and a tick bot to accept terms and conditions anyway, the problem is when I submit it, it says there is a error with my mail server. I will add my contact form code, and the contact_me.php found in the bin file. Hope someone can help.
`<?php
// check if fields passed are empty
if(empty($_POST['name']) ||
empty($_POST['phone']) ||
empty($_POST['email']) ||
empty($_POST['package'])
empty($_POST['message'])
empty($_POST['tandc']) ||
!filter_var($_POST['email'],FILTER_VALIDATE_EMAIL))
{
echo "No arguments Provided!";
return false;
}
// create email body and send it
$to = 'thomas@directgaming.tv'; // PUT YOUR EMAIL ADDRESS HERE
$email_subject = "Request For: $name"; // EDIT THE EMAIL SUBJECT LINE HERE
$email_body = "You have received a new message from your website's contact form.\n\n"."Here are the details:\n\nName: $name\n\nPhone: $phone\n\nEmail: $email_address\n\nMessage:\n$message\n\ntandc\n\nPackage: $package\n";
$headers = "From: thomas@directgaming.tv\n";
$headers .= "Reply-To: $email_address";
mail($to,$email_subject,$email_body,$headers);
return true;
?>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="SimpltHost Request a server.">
<meta name="author" content="Thomas Wilson">
<link rel="icon" href="favicon.png">
<title>Request</title>
<!-- Bootstrap Core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- Custom CSS -->
<link href="css/modern-business.css" rel="stylesheet">
<!-- Custom Fonts -->
<link href="font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
Hello, I am not too familiar with code and stuff but I have a website and a contact from, I used a template from bootstrap, I have added a few custom feilds such as drop downs and a tick bot to accept terms and conditions anyway, the problem is when I submit it, it says there is a error with my mail server. I will add my contact form code, and the contact_me.php found in the bin file. Hope someone can help.
`<?php
// check if fields passed are empty
if(empty($_POST['name']) ||
empty($_POST['phone']) ||
empty($_POST['email']) ||
empty($_POST['package'])
empty($_POST['message'])
empty($_POST['tandc']) ||
!filter_var($_POST['email'],FILTER_VALIDATE_EMAIL))
{
echo "No arguments Provided!";
return false;
}
$name = $_POST['name'];
$phone = $_POST['phone'];
$package = $_POST['package'];
$message = $_POST['message'];
$tandc = $_POST['tandc'];
// create email body and send it
$to = 'thomas@directgaming.tv'; // PUT YOUR EMAIL ADDRESS HERE
$email_subject = "Request For: $name"; // EDIT THE EMAIL SUBJECT LINE HERE
$email_body = "You have received a new message from your website's contact form.\n\n"."Here are the details:\n\nName: $name\n\nPhone: $phone\n\nEmail: $email_address\n\nMessage:\n$message\n\ntandc\n\nPackage: $package\n";
$headers = "From: thomas@directgaming.tv\n";
$headers .= "Reply-To: $email_address";
mail($to,$email_subject,$email_body,$headers);
return true;
?>
The text was updated successfully, but these errors were encountered: