Code:
<?PHP
$to = "my@email.com";
$subject = "New Order";
$headers = "http://www.mockup-markup.com";
$forward = 0;
$location = "yoursite.com";
$timestamp = date('Y-m-d_His');
mkdir('/home/content/r/t/u/rtuosto/html/clients/uploads/' . $timestamp);
$target_file = '/home/content/r/t/u/rtuosto/html/clients/uploads/' . $timestamp . '/' . basename($_FILES['file']['name']);
$date = date ("l, F jS, Y");
$time = date ("h:i A");
$msg = "Below is the result of your feedback form. It was submitted on $date at $time.\n\n";
if ($_SERVER['REQUEST_METHOD'] == "POST") {
foreach ($_POST as $key => $value) {
$msg .= ucfirst ($key) ." : ". $value . "\n";
}
}
else {
foreach ($_GET as $key => $value) {
$msg .= ucfirst ($key) ." : ". $value . "\n";
}
}
mail($to, $subject, $msg, $headers);
if ($forward == 1) {
header ("Location:$location");
}
else {
}
if (move_uploaded_file($_FILES['file']['tmp_name'], $target_file)) {
// Succeeded
} else {
}
?>