Jump to content

Textbox information not being sent to email?


DRYICENZ

Recommended Posts

Hi all,

 

I'm hoping someone can check my php coding and tell me why client information on my contact page... http://www.dryiceproductions.com/contact.html

Such as "Name:" "Email:" & "Comments:"

 

... is not being forward to my email? I know my email address is correct as I receive a message which says:

 

Name:

Email: " . . "

Comments: " . . "

 

Only the fields are blank despite filling them in while testing?

 

Please view the php coding below:

 

<?php

 

/* Email Variables */

 

$emailSubject = 'contactformprocess!';

$webMaster = '[email protected]';

 

/* Data Variables */

 

$email = $_POST['email'];

$name = $_POST['name'];

$comments = $_POST['comments'];

 

$body = <<<EOD

 

 

 

Name: $name

 

Email: " . $email . "

 

 

Comments: " . $comments . "

 

EOD;

$headers = "From: " . $email . "\r\n"; $headers .= "Content-type: text/html\r\n";

$success = mail($webMaster, $emailSubject, $body, $headers);

 

/* Results rendered as HTML */

 

$theResults = <<<EOD

<html>

<head>

<title>sent  message</title>

<meta http-equiv="refresh"  content="3;URL=http://www.dryiceproductions.com/contact.html">

<style  type="text/css">

<!--

body {

background-color: #444;

font-family:  Verdana, Arial, Helvetica, sans-serif;

font-size: 20px;

font-style:  normal;

line-height: normal;

font-weight: normal;

color:  #90C1E5;

text-decoration: none;

padding-top: 200px;

margin-left:  150px;

width: 800px;

}

 

-->

</style>

</head>

<body>

<p>Your email has been sent!</p>

<p>You will return to Dry Ice Productions Ltd in a few seconds!</p>

</body>

</html>

EOD;

echo $theResults;

 

Any help you can give would be greatly appreciated!

Many thanks.

 

Geoff

just now i have checked ur url

these are the parameters that are being posted when i submit the form

 

Submit Submit
textarea 324sdasdasd
textfield rqeqwe
textfield2 3121321

 

there is no fileds of name which u have given

$email = $_POST['email'];

$name = $_POST['name'];

$comments = $_POST['comments'];

 

change these in the form which u are submitting..

 

change this

$email = $_POST['email'];

$name = $_POST['name'];

$comments = $_POST['comments'];

 

to like this

 

$email = $_POST['textarea'];

$name = $_POST['textfield'];

$comments = $_POST['textfield2'];

 

or else

 

change the name fields in the form of contact.html page.

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.