PDA

View Full Version : Flash Email Form Just Won't Work...


tomyknoker
06-18-2007, 12:57 AM
I have this form all set up, I have seen a working version and followed everything down to the t! But for the life of me it will not send, the data disappears but nothing... I have tried everything... Can anyone please look at the attached and see if they can see what I am doing wrong it's killing me!!!! :(

LOLFlash
06-18-2007, 03:01 AM
Hi tomyknoker

I take a look at your files, you not even close.

To use amfphp remoting you need at lest watch video tutorials at amfphp.org

I would suggest you search forum for php email. there's working examples just copy and paste.

tomyknoker
06-18-2007, 03:13 AM
But I followed this tutorial, I don't get it... I didi everything that was said... What have I missed?

LOLFlash
06-18-2007, 04:47 AM
the question is why do you need remoting?

it is great feature to communicate flash with server. If you want remoting it, very good but you have to go through tutorial once with server side scripting.

fla file you did right but php wrong.

tomyknoker
06-18-2007, 10:27 AM
Heya... Ok well I fixed the first error, the comments were killing it, now I went into the Service Browser and ran my file... I got the following error, but not sure what it means...

array
description The class {maileador} could not be found under the class path {/maileador.php}
details /home/302/domain/html/amfphp/amf-core/app/Actions.php
level User Error
line 116
code AMFPHP_FILE_NOT_FOUND

LOLFlash
06-18-2007, 10:22 PM
I really dont understand why you using remoting for sending mail. Ar you making mail jet. If you need communicate with server 50 -100 times per minute, or you retrive from database hundreds or thoutends items remoting good. Amfphp most likely for database: small sql query from swf to php, huge dataset back from php to swf. Very important server coded data to flash object.
If you need send mail and receive confirmation it is not what remoting designed for. Theris more simple and more reliable way of doing it

maileador.php \\Dont forget create MethodTable file in Browser window


class maileador{
function maileador(){
include(" maileador.methodTable.php");
}
function mailear($FirstName, $Company, $Email, $Comments, $About){
$to="[email protected]";

$body = "You received email from: \n\r Name: ".$FirstName."\n\r Company: ".$Company."\n\r Comments: ".$Comments." \n\r Replay to: ".$Email;

return mail($to,$About, $body)?"Mail successfully sent! ":"Mail delivery failed...;
}
}



make this work after we include header

redownload amf-core folder

you have files missing

tomyknoker
06-18-2007, 11:15 PM
LOLFlash is there anyway you can help me edit my files then so that I can still have all the functionality that is in the maileador.php file? Sorry I'm a total noob and need this form to work desperately if you can help me edit my files I would be SO SO greatful!

LOLFlash
06-21-2007, 03:24 PM
attach your files to post

tomyknoker
06-21-2007, 03:28 PM
hey there all my files are in my first post...

LOLFlash
06-21-2007, 08:40 PM
change your maileador.php

remove all from your maileador.php
copy and paste this code:

<?php
class maileador{
function maileador(){
include(" maileador.methodTable.php");
}
function mailear($FirstName, $Company, $Email, $Comments, $About){
$to="[email protected]";

$body = "You received email from: \n\r Name: ".$FirstName."\n\r Company: ".$Company."\n\r Comments: ".$Comments." \n\r Replay to: ".$Email;

return mail($to,$About, $body)?"Mail successfully sent! ":"Mail delivery failed...";
}
}
?>

and reattache new version

tomyknoker
06-23-2007, 11:37 AM
Hi LOLFlash thanks for that... Ok I updated my php file and have reattached the files :) Thanks for all your help!

LOLFlash
06-23-2007, 03:32 PM
When you testing fla file in flash open:

Window -> Other Panels -> NetConnection Debugger

and check trace