PDA

View Full Version : flash contact form with amfphp problem


maddock
10-08-2005, 05:46 PM
Hello,

I'm making a flash contact form on my site with amfphp and I send the vars in a loadvarsobject to php

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"

maddock
10-08-2005, 09:21 PM
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'];