Hello all!
I've been out of the HTML/PHP scene for a couple years now and I'm feeling a bit dated. Spent the last four years learning Labview and lost my basic web programming skills, it seems.
I'm trying to create a basic survey form for my company's website. I'm working with an example that you have on this site and from a form standpoint, it's nice and easy to modify the look to do what I need it to.
Here is the example: http://www.phpbuilder.com/columns/patterson20051018.php3
I modified the form and uploaded it to a freebie web space to test, and can't seem to get it to work: http://rbrooks8.myhosting247.com/ntd2.html
I thought I modified process.php correctly, but it just doesn't seem to do anything.
Here is my php code (modified from the example code):
<?php
$rate = Array(1=>'10%',
2=>'20%',
3=>'30%',
4=>'40%',
5=>'50%');
6=>'60%',
7=>'70%',
8=>'80%',
9=>'90%',
10=>'100%');
// Get all $_POST variables
foreach($_POST as $var => $val)
{
${$var} = $val;
}
// Set up the email body
$body_body .= "Respondent Demographics:\n";
$body_body .= " Company-------------| ".$company."\n";
$body_body .= " Name----------------| ".$name."\n";
$body_body .= " Email Address-------| ".$email."\n";
$body_body .= " Phone---------------| ".$phone."\n";
$body_body .= "----------------------------------------------------\n";
$body_body .= "Survey Results:\n";
$body_body .= " Overall Satisfaction-| ".$rate[$overall]."\n";
$body_body .= " Speed of Service-----| ".$rate[$speed]."\n";
$body_body .= " Tech Support---------| ".$rate[$rep]."\n";
$body_body .= " Product Quality------| ".$rate[$rec]."\n";
$body_body .= " Service Value--------| ".$rate[$value]."\n";
$body_body .= " Courtesy of Rep------| ".$rate[$courtesy]."\n";
$body_body .= " Availability of Rep--| ".$rate[$avail]."\n";
$body_body .= " Compared to others---| ".$rate[$comp]."\n";
$body_body .= " Comments-------------| ".$feedback."\n";
$body_body .= "----------------------------------------------------\n";
$body_footer = "Survey Results provided as is from www.nesbearings.com";
$to = 'Ralph Brooks <rbrooks@nesbearings.com>';
$subject = 'Customer Survey Results';
$body = $body_body.$body_footer;
mail($to, $subject, $body);
echo '<div style="white-space: pre">';
print_r(str_replace("\n", "<br />",$body));
echo '</div>';
?>
...
God I hope that posts right and doesn't crash something.
Anyway, I can't get it to email me on that free webspace (it just goes to a blank page), and on another free web space I get a 405 error indicating bad programming.

Can someone please glance at that and tell me what sucks? I'll be forever grateful.
