Current location: Hot Scripts Forums » General Community » Script Requests » URGENT! Mail form Flash 8/MX PHP doesn't work anymore


URGENT! Mail form Flash 8/MX PHP doesn't work anymore

Reply
  #1 (permalink)  
Old 03-08-09, 01:54 PM
Dougielove Dougielove is offline
New Member
 
Join Date: Mar 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Thumbs down URGENT! Mail form Flash 8/MX PHP doesn't work anymore

I have a serious issue. First off I have little experience with .php. The only experience I do have is when I modify these mail forms that I make with Flash.

Previously, I have been able to successfully create these forms in Flash with a .php file on the server. No issues at all.

Now, I don't know what has changed but the form template I have used in the past isn't working. I can send the info to connect with the PHP file on the server but my email I receive is blank. Same with 80% of the files, tutorials, examples I find on the net they just give me blank emails. The other 20% of examples don't work at all.

My previous ones don't work, the ones on the net where all I really have to do is change the email recipient on the PHP don't work. Nothing is working all of a sudden. I have no time to figure all of this out. And I have nothing to work with. I thought at least if I could get one of these examples from the internet to work then I'd have a starting point...but with no starting point I am screwed.

Does anyone have a form like this that WORKS! Or could anyone point me the right way. And why all of a sudden does this not work. It seems sooooo straight forward. I am running Flash 8 Pro on Vista if that helps

Thanks and please help me! Please.
Reply With Quote
  #2 (permalink)  
Old 03-09-09, 09:26 AM
bizzar528's Avatar
bizzar528 bizzar528 is offline
Community Liaison
 
Join Date: Sep 2004
Location: Pennsylvania, US
Posts: 1,550
Thanks: 2
Thanked 16 Times in 15 Posts
I'd say post the code your using to generate the emails and we'll probably be able to tell you why it's not working. There are a lot of things that can affect email.
Reply With Quote
  #3 (permalink)  
Old 03-09-09, 09:19 PM
Dougielove Dougielove is offline
New Member
 
Join Date: Mar 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
submit button on .swf file is



on (release) {
if (!Email.length || Email.indexOf("@") == -1 || Email.indexOf(".") == -1) {
EmailStatus = "Please enter a valid E-mail address";
}

else if (!FirstName.length) {
EmailStatus = "Please Enter your name before Sending";
}

else if (!ToComments.length) {
EmailStatus = "Please enter some text in you message";
}

else {
loadVariablesNum("snowMailPHP.php", "0", "POST");
EmailStatus = "Sending... one Moment .. or two.. sometimes it's faster then other times";

}
}

snowmail.php


<?

$ToEmail = "xxxxxxx@xxxxxxxx.com";

$ToName = "xxxxxxx";
$ToSubject = "Property Evaluation Form Filled Out From Website";

$EmailBody = "Sent By: $_POST[First]\n\n";
$EmailBody = "$_POST[Last]\n\n";
$EmailBody .= "Senders Email: $_POST[Email]\n\n";
$EmailBody .= "Senders Day Phone: $_POST[Phone]\n\n";
$EmailBody .= "*********************************************\n\n ";
$EmailBody .= "*****************HOME DETAILS****************\n\n";
$EmailBody .= "*********************************************\n\n ";
$EmailBody .= "Address: $_POST[Address]\n\n";
$EmailBody .= "City: $_POST[City]\n\n";
$EmailBody .= "Postal Code: $_POST[Postal]\n\n";
$EmailBody .= "Type of Home: $_POST[Type]\n\n";
$EmailBody .= "Square Footage: $_POST[Footage]\n\n";
$EmailBody .= "# of bedrooms: $_POST[Bedrooms]\n\n";
$EmailBody .= "# of bathrooms: $_POST[Bathrooms]\n\n";
$EmailBody .= "Year Built: $_POST[Year]\n\n";
$EmailBody .= "Additional Features/Comments:\n";
$EmailBody .= "$_POST[ToComments]\n";


$EmailFooter="\nThis message was sent by: $_POST[First]\n from $REMOTE_ADDR\n";

$Message = $EmailBody.$EmailFooter;

mail($ToName." <".$ToEmail.">",$ToSubject, $Message, "From: ".$First." <".$Email.">");


Print "_root.Mail.EmailStatus=Complete - Your mail has been sent";

?>
Reply With Quote
  #4 (permalink)  
Old 03-10-09, 08:07 AM
bizzar528's Avatar
bizzar528 bizzar528 is offline
Community Liaison
 
Join Date: Sep 2004
Location: Pennsylvania, US
Posts: 1,550
Thanks: 2
Thanked 16 Times in 15 Posts
here is how I would write that... only some minor cosmetic changes... I'm not so sure about that last Print statement. I'm guessing it's supposed to pass that value back to the swf, but I haven't used that method before so I'm not sure. You might also want to check your error_log file to see if there might be a php error that isn't getting shown. That might give you a little more information as to what's failing.

Edit:: You probably should scrub your $_POST input to make sure that malicious code isn't used to send spam through your form. Sometimes they add a \r\n to an input to add additional email values and to send garbage. Limit the character count of the input, and which characters are acceptable (block the \ from the posts) and you should be safer.

PHP Code:

<?php


$ToEmail 
"xxxxxxx@xxxxxxxx.com";

$ToName "xxxxxxx";
$ToSubject "Property Evaluation Form Filled Out From Website";

$EmailBody "Sent By: ".$_POST['First']."\n\n";
$EmailBody .= $_POST['Last']."\n\n";
$EmailBody .= "Senders Email: ".$_POST['email']."\n\n";
$EmailBody .= "Senders Day Phone: ".$_POST['Phone']."\n\n";
$EmailBody .= "*********************************************\n\n";
$EmailBody .= "*****************HOME DETAILS****************\n\n";
$EmailBody .= "*********************************************\n\n";
$EmailBody .= "Address: ".$_POST['Address']."\n\n";
$EmailBody .= "City: ".$_POST['City']."\n\n";
$EmailBody .= "Postal Code: ".$_POST['Postal']."\n\n";
$EmailBody .= "Type of Home: ".$_POST['Type']."\n\n";
$EmailBody .= "Square Footage: ".$_POST['Footage']."\n\n";
$EmailBody .= "# of bedrooms: ".$_POST['Bedrooms']."\n\n";
$EmailBody .= "# of bathrooms: ".$_POST['Bathrooms']."\n\n";
$EmailBody .= "Year Built: ".$_POST['Year']."\n\n";
$EmailBody .= "Additional Features/Comments:\n";
$EmailBody .= $_POST['ToComments']."\n";

$EmailFooter="\nThis message was sent by: ".$_POST['First']."\n from ".$_SERVER['REMOTE_ADDR']."\n";

$Message $EmailBody.$EmailFooter;

mail($ToName." <".$ToEmail.">"$ToSubject$Message"From: ".$First." <".$Email.">");

Print 
"_root.Mail.EmailStatus=Complete - Your mail has been sent";

?>
Reply With Quote
  #5 (permalink)  
Old 03-15-09, 08:50 AM
mjoyce71 mjoyce71 is offline
New Member
 
Join Date: Mar 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Doug,

Try these guys -> formmailhosting.com - They take care of all the email sending and put the sender in the reply to field. They also save the submissions as MS Excel (nice feature). You can make their forms work with Flash with little problems at all.

Mark.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
how do i work with PHP mail() function darkcarnival PHP 5 08-31-09 05:11 PM
The Art Nexus seeking PHP programmers TheArtNexus Job Offers & Assistance 5 02-26-08 03:08 AM
Attach files to your form mail using PHP OMID SOFT Script Requests 0 04-17-04 07:26 PM
mail() doesn't work anymore cassio PHP 2 01-05-04 09:20 AM
PHP Triad/Upload form eddyvlad PHP 6 10-06-03 11:17 PM


All times are GMT -5. The time now is 09:23 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.