Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PHP email input form - having trouble getting the form to work...
#1
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>
Reply


Messages In This Thread
PHP email input form - having trouble getting the form to work... - by abayindi - 02-13-2012, 03:26 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  PHP Framework List: An Ultimate Guide to 102 PHP Frameworks for Web Developers tk-hassan 0 936 07-27-2020, 11:26 PM
Last Post: tk-hassan
  help with mass email php ceptic 2 1,480 07-28-2012, 04:58 AM
Last Post: ceptic
  [NEED HELP] PHP Form post, get, echo Đενɨаηсε™ 5 2,067 02-06-2012, 01:16 PM
Last Post: ★Cooldude★
  How to make a form. HB Virus 10 3,623 12-30-2011, 08:03 PM
Last Post: BreShiE
  PHP Video Tutorials (PHP For Beginners) Eleqtriq 4 3,659 10-10-2011, 01:00 PM
Last Post: Greyersting

Forum Jump:


Users browsing this thread: 1 Guest(s)