Hi, I am trying dynamically populate a HTML form from a text file. I can view the form, but when I try to POST it, I am unable to retrieve any of the data that was entered into the form.
HTML Form Side:
for the sendmail.php:<?php $myFile = "text.txt"; $fh =fopen($myFile,'r'); $theData = fgets($fh); fclose($fh); $value = $_Post[$theData]; $message = "This is the Value Sent to you: ' . $value . '"; $to = '[email protected]'; $email = '[email protected]'; $subject = 'Form'; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= 'To: ' . $to . "\r\n"; $headers .= 'From: ' . $email . "\r\n"; @mail( $to, $subject, $message, $headers); ?>
Of course this is simplified for only one input, the real use will have multiple input tags. I even have problems when I hard code the Post function with the value that I know is in the text file. Any help and insight is greatly appreciate it. Thank you