PHP Formemail Not showing phone or email

I am having problems with PHP Formemail again with a different site. So whenever I post a test form, I fill out every field, but I only get the name, interests and message back. The email is supposed to show both in the email with the rest of the fields and as the sender, it shows up as neither and the phone doesn't show up either. Here is the PHP code:\[code\]<?php$adminemail = '[email protected]';$controlvars = ' thankspage submitter ccsubmitter messagetosubmitter ';$messagetoadmin = $_POST['Name'] ." has sent you the following message:"; else $messagetosubmitter = $_POST['messagetosubmitter'];while(list($key, $value) = each($_POST)){ if (!stristr($controlvars, ' '. $key .' ')) { $messagetoadmin .= $key .': '. $value .''; $messagetosubmitter .= $key .': '. $value .''; }} $submitter = $_POST['Email'];if ($submitter == '') $submitter = '[email protected]';if (strstr($submitter, "\n") || strlen($submitter) > 50) die("Begone, foul spammer.");mail($adminemail, 'Message from site: '. stripslashes($_POST['subject']), stripslashes($messagetoadmin), 'From: '. $submitter);if ($_POST['ccsubmitter'] == 'yes'){ mail($Email, 'Message from site: '. stripslashes($_POST['subject']), stripslashes($messagetosubmitter), 'From: '. $adminemail);}if ($autoresponse != ''){ $body = geturl($autoresponse); mail($Email, 'Re: '. stripslashes($_POST['subject']), stripslashes($body), 'From: '. $adminemail);}header('Location: '. $_POST['thankspage']);// just in case redirect doesn't workdie('<meta http-eqiv="refresh" content="0;url='. $_POST['thankspage'] .'">');if (!function_exists('geturl')){function geturl($url){ if (extension_loaded('curl')) { $user_agent = 'Mozilla/4.0 (compatible; MSIE 6.02; PHP)'; $ch = curl_init(); curl_setopt ($ch, CURLOPT_URL, $url); curl_setopt ($ch, CURLOPT_USERAGENT, $user_agent); curl_setopt ($ch, CURLOPT_HEADER, false); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, 15); // timeout after 5 seconds curl_setopt ($ch, CURLOPT_TIMEOUT, 15); // timeout after 5 seconds curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, true); $result = curl_exec ($ch); curl_close ($ch); // curl_error($ch); // for debugging return $result; } if (version_compare("4.3.0", phpversion(), "<")) { $filecontents = @file_get_contents($url); } else { $fd = @fopen($url, 'rb'); $filecontents = ""; do { $data = http://stackoverflow.com/questions/15909499/@fread($fd, 8192); if (strlen($data) == 0) { break; } $filecontents .= $data; } while(true); @fclose ($fd); } return $filecontents;}}?>\[/code\]And here is the HTML for the form:\[code\]<form name="Contact" id="Contact" method="post" action="formemail.php" onsubmit="return ValidateContactForm();"> <input type="hidden" name="thankspage" value="http://stackoverflow.com/questions/15909499/thankyou.html"> <input type="hidden" name="ccsubmitter" value="http://stackoverflow.com/questions/15909499/yes"> <label><span>Name: *</span> <input name="Name" type="text" > </label> <label><span>Email: *</span> <input name-"Email" type="text" > </label> <label><span>Phone:</span> <input name-"Phone" type="text" > </label> <label><span>Interests:</span> <input name="interests" type="text" > </label> <label><span>Message:</span></label> <label><textarea name="message" cols="30" rows="10" ></textarea> </label> <input type="submit" value=""> </form>\[/code\]Any help at all would be greatly appreciated and forever remembered. Thank you in advance for your wonderful kindness!ETA: I tried adding id= and value= http://stackoverflow.com/questions/15909499/to the HTML form fields, but that did absolutely nothing. It still only returned the name, interests and message and the email showed it was from [email protected]. Thanks!
 
Back
Top