* Sunda Cyber Army 2k17 *
Indonesia Defacer ~
<html>
<head>
<title>Site Feedback Form</title>
</head>
<style>
body {
background-color: steelblue;
}
#container {
background-color: lightsteelblue;
width: 400px;
margin: auto;
padding: 20px;
border-radius: 10px;
}
h1 {
color: darksteelblue;
margin-top: 0;
font-style: italic;
text-align: center;
}
h2 {
// text-align: center;
color: white;
font-weight: bold;
}
hr {
border-color: steelblue;
}
input {
width: 100%;
}
textarea {
width: 100%;
height: 90px;
}
input[type='submit'] {
padding: 5px;
border-radius: 5px;
color: white;
background-color: steelblue;
}
input[type='submit']:hover {
background-color: rebeccapurple;
}
</style>
<body>
<div id="container">
<?php
// first we need to determine whether or not the page is loading for the first time
// or if a form was "submitted" to the page
// This is set up as an 'all in one' page...
// where the feedback form AND the email code is in ONE page
if(empty($_REQUEST["userfeedback"])) {
// NEED to build form
// end php block to output html .. STILL inside the "if" block
?>
<h1>Site Feedback Form</h1>
<h2>Please fill out the form below
to send an email to our webmaster</h2>
<hr/>
<form action="" method="get">
<div style="border:gray 1px solid; padding: 10px">
Email to send form to:<br>
<input type="text" name="destinationemail">
</div>
Name:<br>
<input type="text" name="username"/>
<br/><br>
Email:<br>
<input type="text" name="useremail"/>
<br/><br>
Subject:<br>
<input type="text" name="usersubject"/>
<br/><br>
Feedback:<br>
<textarea name="userfeedback"></textarea>
<br/><br>
<input type="submit" value="Send Email"/>
</form>
<?php
// END of form... now close "if" branch...
} else {
// form was submitted so email results
$to = $_REQUEST["destinationemail"]; // populated by form
// this would be the permanent address you want all feedback to go to.
$subject = $_REQUEST["usersubject"] ; // from the form
$message = $_REQUEST["userfeedback"]; // from the form
$from = $_REQUEST["useremail"]; // from the form
$headers = "From: $from"; // create a header entry for "FROM" field of email
$headers = "From:$from"; // create a header entry for "FROM" field of email
$headers = "FROM:" . $_REQUEST["username"] . "<" . $_REQUEST["useremail"] . ">";
// More complicated "FROM" field that has name <email> syntax
$test = mail($to,$subject,$message,$headers);
if ($test == 1) {
echo "Thank You. Your email was sent.";
echo "<br><br><em>(Server response: " . $test . ")</em> ";
echo "<hr>Email string:" . "mail($to,$subject,$message,$headers)";
} else {
echo "ERROR. |" , $test . "| Your email was not sent.";
// probably should send email to webmaster that there was a problem.
}
exit();
}
?>
</div> <!-- close container -->
</body>
</html>