c14agi Posted May 27, 2010 Share Posted May 27, 2010 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 More sharing options...
jdavidbakr Posted May 27, 2010 Share Posted May 27, 2010 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. Link to comment https://forums.phpfreaks.com/topic/203141-problem-with-flash-php/#findComment-1064372 Share on other sites More sharing options...
c14agi Posted May 27, 2010 Author Share Posted May 27, 2010 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']" ??? Link to comment https://forums.phpfreaks.com/topic/203141-problem-with-flash-php/#findComment-1064388 Share on other sites More sharing options...
c14agi Posted May 27, 2010 Author Share Posted May 27, 2010 Ok, I lowercased "print" and I tried this: Sent By: "$_POST['input0']" and Sent By: "$_GET['input0']" This way I don't receive any mail at all. Nice try though. I really appreciate the effort. Any other suggestions??? Link to comment https://forums.phpfreaks.com/topic/203141-problem-with-flash-php/#findComment-1064401 Share on other sites More sharing options...
calmchess Posted May 27, 2010 Share Posted May 27, 2010 does your php email program support html? because your script is sending a html email. Link to comment https://forums.phpfreaks.com/topic/203141-problem-with-flash-php/#findComment-1064403 Share on other sites More sharing options...
c14agi Posted May 27, 2010 Author Share Posted May 27, 2010 Certainly does. As I wrote at the beginning of this threat, I receive a perfectly "styled" mail... but it is EMPTY. I also tried to send it to my hotmail account.... WORKED, too Link to comment https://forums.phpfreaks.com/topic/203141-problem-with-flash-php/#findComment-1064408 Share on other sites More sharing options...
jdavidbakr Posted May 27, 2010 Share Posted May 27, 2010 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']" Link to comment https://forums.phpfreaks.com/topic/203141-problem-with-flash-php/#findComment-1064423 Share on other sites More sharing options...
c14agi Posted May 28, 2010 Author Share Posted May 28, 2010 Ok, did it (tried GET, too) I do receive the mail, but just like before (empty) nothing changed Link to comment https://forums.phpfreaks.com/topic/203141-problem-with-flash-php/#findComment-1064427 Share on other sites More sharing options...
jdavidbakr Posted May 28, 2010 Share Posted May 28, 2010 You may need to contact the author you bought the template from and find out what the variables are being posted as. Link to comment https://forums.phpfreaks.com/topic/203141-problem-with-flash-php/#findComment-1064428 Share on other sites More sharing options...
calmchess Posted May 28, 2010 Share Posted May 28, 2010 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 Link to comment https://forums.phpfreaks.com/topic/203141-problem-with-flash-php/#findComment-1064430 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.