Keith Baker - 2008-12-30

http://www.keifergarzoli.com/contact.html

I get an error message that is found on the processor script so the form is directed to the correct place at least.

Here is the php I have for the form.

<?php

$where_form_is="http://".$_SERVER['SERVER_NAME'].strrev(strstr(strrev($_SERVER['PHP_SELF']),"/"));

session_start();
// File upload handling
if($_FILES['field_8']['name']!=''){
$field_8_filename = "file_8_".date("sihdmY").substr($_FILES['field_8']['name'],strlen($_FILES['field_8']['name'])-4);
if(!move_uploaded_file($_FILES['field_8']['tmp_name'], "./files/".$field_8_filename)){
die("File " .  $_FILES['field_8']['name'] . " was not uploaded.");
}

mail("keithbaker.memphis@gmail.com","phpFormGenerator - Form submission","Form data:

Name:: " . $_POST['field_1'] . "
Country:: " . $_POST['field_2'] . "
State:: " . $_POST['field_3'] . "
How did you hear about us?: " . $_POST['field_4'] . "
Other:: " . $_POST['field_5'] . "
Comments:: " . $_POST['field_6'] . "
Did you fin what you were looking for?: " . $_POST['field_7'] . "
Upload Box:: ".$where_form_is."files/".$field_8_filename." (original file name: " . $_FILES['field_8']['name'] . ")

powered by phpFormGenerator.
");

include("contactfiles/confirm.html");
}
else {
echo "Error! Please try again";
}

?>

Thanks