02-13-2012, 03:26 PM
I created a php form to capture an email address, then i want to send the email address i captured to my email (hidden in this code). I'm getting the following error and not sure why... "No input file specified." I tried to rename forms, id's, i'm new to php so not really sure what i'm missing. Please help, thanks.
Here is the PHP form code process: page name is: contactformprocess.php
-----------------------------------------------------------------
<? php
/*subject line and email veriables */
$emailSubject = 'crazy php script!';
$webMaster = '[email address is hidden for stackoverflow]';
/*gathing data vaiables */
$emailField = $_POST['FormName'];
$body = <<<EOD
<br><hr><br>
Email: $textfieldName <br>
EOD;
$headers = "From: $FormName\r\n";
$headers .= "Content-type: text/html\r\n";
$success = mail ($webMaster, $emailSubject, $body, $headers);
/* Results rentered as html */
$theResults = <<<EOD
<html>
<head>
<title>JakesWorks - travel made easy-Homepage</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body {
background-color: #f1f1f1;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
font-style: normal;
line-height: normal;
font-weight: normal;
color: #666666;
text-decoration: none;
}
-->
</style>
</head>
<div>
<div align="left">Thank you for your interest! Your email will be answered very soon!</div>
</div>
</body>
</html>
EOD;
echo "$theResults";
?>
The FORM code is here: html page
-----------------------------------------------------------
<form id="newsletteremail" class="form" method="post" action="contactformprocess.php">
<span class="newsletter">Monthly Newsletter Signup</span><br>
<span class="text1_off">Subscribe and be the first to know.<br>
</span><span class="text1_off"><br>
<table width="190" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><input class="newletter_box" type="text" name="newsletteremail" value=" Enter your e-mail" size="16"></td>
<td></td>
<td align="right"><a onmouseover="changeImages('submit_off','images/submit_over.gif');return true" onmouseout="changeImages('submit_off','images/submit_off.gif');return true" href="contactformpage.php"><img id="submit_off" src="images/submit_off.gif" alt="" name="newsletteremail" height="24" width="60" border="0"></a></td>
</tr>
</table>
</span>
</form>
Here is the PHP form code process: page name is: contactformprocess.php
-----------------------------------------------------------------
<? php
/*subject line and email veriables */
$emailSubject = 'crazy php script!';
$webMaster = '[email address is hidden for stackoverflow]';
/*gathing data vaiables */
$emailField = $_POST['FormName'];
$body = <<<EOD
<br><hr><br>
Email: $textfieldName <br>
EOD;
$headers = "From: $FormName\r\n";
$headers .= "Content-type: text/html\r\n";
$success = mail ($webMaster, $emailSubject, $body, $headers);
/* Results rentered as html */
$theResults = <<<EOD
<html>
<head>
<title>JakesWorks - travel made easy-Homepage</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body {
background-color: #f1f1f1;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
font-style: normal;
line-height: normal;
font-weight: normal;
color: #666666;
text-decoration: none;
}
-->
</style>
</head>
<div>
<div align="left">Thank you for your interest! Your email will be answered very soon!</div>
</div>
</body>
</html>
EOD;
echo "$theResults";
?>
The FORM code is here: html page
-----------------------------------------------------------
<form id="newsletteremail" class="form" method="post" action="contactformprocess.php">
<span class="newsletter">Monthly Newsletter Signup</span><br>
<span class="text1_off">Subscribe and be the first to know.<br>
</span><span class="text1_off"><br>
<table width="190" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><input class="newletter_box" type="text" name="newsletteremail" value=" Enter your e-mail" size="16"></td>
<td></td>
<td align="right"><a onmouseover="changeImages('submit_off','images/submit_over.gif');return true" onmouseout="changeImages('submit_off','images/submit_off.gif');return true" href="contactformpage.php"><img id="submit_off" src="images/submit_off.gif" alt="" name="newsletteremail" height="24" width="60" border="0"></a></td>
</tr>
</table>
</span>
</form>