Making the report button

Last night I decided to work on making a report button, this will improve the users experience of our Turtle Talks website because if the audience feel offended by any posts then they can send a direct email to me along with the subject of the mail. I still need to make improvements and add it into the code that Darlene has been working on however the email did not send to me because I do not have a mail server on the local host I have been using via WAMP. Below is the code that i used as well as a screen shot of how it looks.

<?php require_once("../includes/session.php"); ?>
<?php require_once("../includes/connect.php"); ?>
<?php require_once("../includes/functions.php"); ?>
<?php include_once("../includes/templates/header.php"); ?>

<?php echo $_SESSION["user_id"]; ?>

if(isset($_POST["submit"])) {
$to = "";
$subject = ($_POST["subject"]);

$mail = ($_POST["mail"]);

// Always set content-type when sending HTML email
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";


<form class="form-signin" action="" method="post">
<h2 class="form-signin-heading text-center">Send a report</h2>
<label class="sr-only">subject</label>
<input type="text" class="form-control" placeholder="subject" name="subject" value="" />
<label class="sr-only">Mail</label>
<input type="text" class="form-control" placeholder="mail" name="mail" value="" />
<button class="" type="submit" name="submit" value="Submit">send mail</button>

<?php include_once("../includes/templates/footer.php"); ?>


Above: screenshot of the basic report button. The error returned is because my mail is not linked up.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s