Jump to content

Problem with Flash + PHP


c14agi

Recommended Posts

Hi, I'm new here looking for some REAL HELP.

 

I'm building a site with a Flash Template (I bought). Everything looks fine and works perfectly EXCEPT the Mailform, which is PHP.

I'm not a programmer and I have n idea about PHP.

 

What happens in details:

 

When I fill out and submit the form, a (Flash preset) message tells me :"Sorry, try again".

BUT I also receive the mail. With perfect "From", "Subject", "footer".... everything. Even the style of the EmailBody is right. It's just that the "Body" part is empty!!!

 

So I figured, something is wrong in the EmailBody part.

 

Can ANYONE please tell me, where the ERROR is?!?! PLEASE!!!

 

That's what the PHP looks like:

<?

//name = input0
//email = input1
//comments = input2

$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'From: 000000000000' . "\r\n" .'Reply-To: 000000000000' . "\r\n";

$ToEmail = "000000000000";

$ToName = "000000000000";
$ToSubject = "000000000000";

$EmailBody = "
<table width='700' height='200' border='0' bgcolor='#999999'>
  <tr>
    <td><font size='2' face='Arial' color='#ffffff'>Sent By: " . $input0 . "\nEmail:" . $input1. "\nMessage:" . $input2 ." </font></td>
  </tr>
</table>";

$EmailFooter="\n00000000000";

$Message = $EmailBody.$EmailFooter;

mail($ToName." <".$ToEmail.">",$ToSubject, $Message, $headers);

Print "_root.Status=success";

?>

 

(The "000000000000" are the parts I figured out myself. They run PERFECTLY)

 

The mail I receive looks like this:

 

"from text"

"subject text"

 

Sent By:    (empty)

Email:        (empty)

Message:  (empty)

 

"footer text"

 

Thanks in advance for ANY HELP!!!

Link to comment
https://forums.phpfreaks.com/topic/203141-problem-with-flash-php/
Share on other sites

Is that the entirety of the script?  It may be assuming that register_globals is turned on, which if you're on a current version of PHP it should be turned off as it's a security problem.  Try changing your variables in the code to $_POST['inputX'] instead of $inputX and see if you get anything differently.  If that doesn't work it may be sending the variables via GET, try $_GET['inputX'].

 

I think you need to lower-case "print" also, "Print" isn't a PHP function.  That could be why your flash app isn't responding correctly.

Thanx for the tip so far, Jon.

 

Yes, that's the entire code.

 

I lowercased "print".

 

Now I'm a little confused withe the bunch of brackets in the code. Let's just say my code is this:

 

Sent By: " . $input0 . "

 

becomes

 

Sent By: "$_POST['input0']"

 

???

 

You still need the .'s:

 

Sent By: ".$_POST['input0']."

 

not

 

Sent By: "$_POST['input0']"

after reading over this post i'd say flash  isn't sending any variables over its just calling the file who wrote the php page?flash user $_POST['name']; to send data so either you have those names in correct or it never sent them in the first place.....conclusion the program is hosed

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.