Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Flash Remoting / October 2005



Tip: Looking for answers? Try searching our database.

Flash contact form with amfphp

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
@ngelina - 08 Oct 2005 17:31 GMT
Hello,
 
I'm making a contact form on my site with amfphp and I send the vars in a
loadvarsobject to php:
 
sendContactForm = function(_contactObj) {
this.createNetconnection();
var contactResponder = new Object();
contactResponder.objRef = this;
contactResponder.onResult = function(result) {
this.objRef.broadcastMessage("_sendContactFormResult", result);
};
this.connection.call("Project.sendContactForm", contactResponder,
_contactObj);
};
 
 
The problem is I don't seem to be able to acces the vars in PHP.
 
This is what I have in PHP:  
 
function sendContactForm($email, $message, $topic)  
{
$email = $_POST["email"];
$message = $_POST["message"];
$topic = $_POST["topic"];
$to = "info@myaddress.be";;  
$subject ="Contact form request from myaddress.be";
if( mail($to, $subject,$message))
return "0k";  
else return "Error";  
}
 
This is what I get in the NetConnection Debugger:
 
Call-Project.sendContactForm({message:hello, subject:testing,
email:info@test.be, topic:request information})
 
MethodName: "Project.sendContactForm"
Parameters (object #2)
.....[0] (object #3)
..........email: "info@test.be";
..........message: "hello"
..........subject: "testing"
..........topic: "request information"
:frown;
@ngelina - 08 Oct 2005 21:25 GMT
Solved it with help from someone at flashfocus, I had to thread the object as
an associative array!

$mail = $result['topic'];
$mail .= $result['email'];
$mail .= $result['subject'];
$mail .= $result['message'];
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.