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
#2
Take a look at some available online scripts, compare them with yours and then try to figure out what's going wrong.

http://phpeasystep.com/phptu/8.html
http://www.freecontactform.com/email_form.php
http://myphpform.com/final-form.php
http://php.about.com/od/phpapplications/...m_mail.htm
Reply
#3
Breshie, why lie? You didn't create this form at all, if you created it you would know why it doesn't work.
You copied the code.
[Image: image.php]
Reply
#4
(02-14-2012, 08:28 AM)TalishHF Wrote: Breshie, why lie? You didn't create this form at all, if you created it you would know why it doesn't work.
You copied the code.

Who said he he did?
BreShie Wrote:Take a look at some available online scripts

PHP Code:
$_POST['FormName']; 

I don't see a "FormName" id anywhere in the form html.

Code:
Email: $textfieldName

$textfieldName is undefined previously in the php code from what you've posted.

I see in the form code:
- newsletteremail
- newsletteremail

And NO submit input.
Reply
#5
$emailField = $_POST['FormName'];

Don't you mean

$emailField = $_POST['newsletteremail];

?
Reply


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 943 07-27-2020, 11:26 PM
Last Post: tk-hassan
  help with mass email php ceptic 2 1,485 07-28-2012, 04:58 AM
Last Post: ceptic
  [NEED HELP] PHP Form post, get, echo Đενɨаηсε™ 5 2,077 02-06-2012, 01:16 PM
Last Post: ★Cooldude★
  How to make a form. HB Virus 10 3,637 12-30-2011, 08:03 PM
Last Post: BreShiE
  PHP Video Tutorials (PHP For Beginners) Eleqtriq 4 3,671 10-10-2011, 01:00 PM
Last Post: Greyersting

Forum Jump:


Users browsing this thread: 1 Guest(s)