Sindbad~EG File Manager
<?php
/* Set e-mail recipient */
$myemail = "feednationngo@gmail.com";
/* Check all form inputs using check_input function */
$yourname = check_input($_POST['name'], "Enter your name");
$email = check_input($_POST['email']);
$mobile = check_input($_POST['mobile']);
$city = check_input($_POST['city']);
$subject = check_input($_POST['subject']);
$message = check_input($_POST['message']);
/* Let's prepare the message for the e-mail */
$grea = "Hello!
Message from your website:
Name: $name
E-mail: $email
Mobile: $mobile
City: $city
Subject: $subject
Message: $message
";
/* Send the message using mail() function */
mail($myemail, $subject, $grea);
/* Redirect visitor to the thank you page */
?>
<script>
alert('Successfully Sent ...');
window.location.href='index.php';
</script>
<?php
exit();
/* Functions we used */
function check_input($data, $problem='')
{
$data = trim($data);
$data = stripslashes($data);
$data = htmlspecialchars($data);
if ($problem && strlen($data) == 0)
{
show_error($problem);
}
return $data;
}
function show_error($myError)
{
?>
<html>
<body>
<b>Please correct the following error:</b><br />
<?php echo $myError; ?>
</body>
</html>
<?php
exit();
}
?>
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists