PHP Not Sending Form Data to Email

Hello

PHP is not sending my flash form field data to my email. When I fill-out a form and hit send button, I only receive the form fields label in my email but not receiving the user data. This is the message I see in my email below:

We have received the following information:

Customer Full Name:
Company Name:
E-mail Address:
Telephone Number:
Country:
State:
City and Post Code:
Shipping Address:
Customer Inquiry:

This is my PHP code below:

[php]<?php
$to = "[email protected]" ;
$name = $_REQUEST[‘name’] ;
$headers = $_REQUEST[‘Email’] ;
$subject = “Quote Request Form”;

$fields = array();
$fields{“name_field”} = “Customer Full Name”;
$fields{“company_field”} = “Company Name”;
$fields{“email_field”} = “E-mail Address”;
$fields{“phone_field”} = “Telephone Number”;
$fields{“country_field”} = “Country”;
$fields{“state_field”} = “State”;
$fields{“city_field”} = “City and Post Code”;
$fields{“address_field”} = “Shipping Address”;
$fields{“message_field”} = “Customer Inquiry”;

$body = “We have received the following information:\n\n”; foreach($fields as $a => $b){ $body .= sprintf("%20s: %s\n",$b,$_REQUEST[$a]); }
$send = mail($to, $subject, $body, $headers);
?>[/php]

Can somebody please help me to re-write the correct code to send the user data from Flash to my email address.

Thanks for your time and support…

The best advise to you would be to stay away from Flash.

There’s a reason why it’s been dropped by all the big boys such as YouTube which is that it’s incredibly insecure. Most mobile devices don’t even support Flash.

Well, what method are you posting the data with? Have you debugged the $_REQUEST array that you are
using to see what is inside it? That would be a starting place. You can use…

print_r($_REQUEST);
die(“done”);

To see what is inside that array. If the data is there, you are spelling it wrong. If not, use a different type
of method to pass the data thru…

I did a little research for you and FLASH is NOT the way to go from what i have read so far. It seems that a
lot of browsers do not allow FLASH to handle form posts as you wish. Also, it would mean that you need
all of your users to have FLASH in place and running. (Not everyone does!) As far as I have read, you do
use the $_REQUEST array. So, first make sure the data is getting into it from your FLASH code. If not, try
a different browser as it appears some of them do not post data thru FLASH correctly. Let us know…

Sponsor our Newsletter | Privacy Policy | Terms of Service