azdrian1837
New Member
- Messages
- 4
- Reaction score
- 0
- Points
- 0
hello everyone,
I create a contact form on my website but the mail are not sending and am not getting any error could someone please help !! thank you.
here's my code
send.php:
and the contact form:
I create a contact form on my website but the mail are not sending and am not getting any error could someone please help !! thank you.
here's my code
send.php:
Code:
<?php //send.php
require ('includes/config.inc.php');
$name = $_POST['name'];
$email = $_POST['email'];
$message = $_POST['message'];
$formcontent= "Name: $name /n Message: $message";
$recipent= "azdrian18@hotmail.com";
$subject= "Contact Form";
$mailheader="From: $email";
mail($recipent,$subject,$formcontent,$mailheader)or die("error in sending mail");
echo "thank you!";
?>
and the contact form:
Code:
<?php //contact.php
$page_title ='Contact us';
include ('includes/header.html');
require ('includes/config.inc.php');
include ('includes/sidebar.php');
?>
<h1>Contact Page</h1>
<p>Quam, praesentium dignissim eros? Quis, saepe! Mollitia eiusmod nesciunt? Corrupti
occaecati aptent, placeat omnis. Blanditiis mollit alias ipsum? Expedita pariatur.</p>
<!-- Start of FORM -->
<form method="post" action="send.php">
<p>Name:<input type="text" name="name"/></p>
<p>Email:<input type="email" name="email"/></p>
<p>Message:</p><textarea name="message" rows="6" cols="25"></textarea><br/ >
<input type="submit" name="send" value="submit"/>
</form>
<!-- End of FORM -->
<?php include ('includes/footer.html'); ?>