maddock
%Europe/Berlin %509 %2005, 13:13
Hallo,
IK maak een contact formulier op mijn site met amfphp en ik verstuur de vars in een LoadVarsObject naar 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);
};
Het probleem is dat ik niet weet hoe ik die vars in PHP moet oproepen , als ik een mail verstuur heb ik enkel een lege email of komt er niks toe. Mail functie PHP is mogelijk op server want een eenvoudig test mailtje werkt.
Dit heb ik in PHP, maar werkt duidelijk niet:
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";
}
Dit heb ik in de 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"
IK maak een contact formulier op mijn site met amfphp en ik verstuur de vars in een LoadVarsObject naar 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);
};
Het probleem is dat ik niet weet hoe ik die vars in PHP moet oproepen , als ik een mail verstuur heb ik enkel een lege email of komt er niks toe. Mail functie PHP is mogelijk op server want een eenvoudig test mailtje werkt.
Dit heb ik in PHP, maar werkt duidelijk niet:
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";
}
Dit heb ik in de 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"