Jump to content


Photo

mail () Not sending all variables


  • Please log in to reply
2 replies to this topic

#1 High Camp

High Camp
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 19 June 2006 - 11:58 PM

Hi There

Thanks for taking the time to answer my post. I have spent hours working on this and searching all sorts of forums for the answer with no luck.

I have built a Flash email contact form that sends the contact on to my email. Here is the PHP code I am using:
<?php
$name = $_Post["namesubmit"];
$email = $_POST["emailsubmit"];
$phone = $_Post["phonesubmit"];
$address = $_Post["addresssubmit"];
$iam = $_Post["iamsubmit"];
$ihave = $_Post["ihavesubmit"];
$text = $_Post["textsubmit"];
$to = "XXX@highcamp.ca"; 
$subject = "Online Email Form";
$headers = "From: $email";
$message = "Name: $name\nEmail: $email\nPhone: $phone\nAddress: $address\nI am a: $iam\nI have a: $ihave\nMessage: $text";
mail($to, $subject, $message, $headers);  
?>
And here is the email I get:
To: XXX@highcamp.ca
From XXX@yahoo.ca (The email I entered in the Flash form)
Subject: Online Email Form
Message Body:
Name:
Email: XXX@yahoo.ca
Phone:
Address:
I am a:
I have a:
Message:

From this I know that Flash is talking to PHP correctly. I have changed the $email variable to other things and it still works I.E. $email = $_Post["namesubmit"]; and this returns from Bob or whatever name I enter in the name field.

I'm not really sure what is going wrong here. I am wondering if maybe it is something in the server setup?

Thanks again for taking the time and hopefully this isn't something too simple that will make me look like at idiot.

High Camp
P.S. if you want to see the Flash form it is at www.highcamp.ca/en/emailform.html

#2 poirot

poirot
  • Members
  • PipPipPip
  • Advanced Member
  • 646 posts
  • LocationAustin, TX

Posted 20 June 2006 - 12:10 AM

Change all $_Post to $_POST; PHP should be case sensitive [although it is not, here].
~ D Kuang

#3 High Camp

High Camp
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 20 June 2006 - 12:19 AM

Thank you soooo much. I Knew it was somehting embarassing that would make me look like an idiot.

If you want to hear excuses its because my monitor has horrible glare on it and I couldn't read it.

Thank you so much.
High Camp




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users