section8ight
03-06-2004, 05:41 PM
i have this php form mailer that I've used in most of my html based sites. Is there a way i could easily use the same script in flash? I've had very little experience working with server side connectivity in flash, and although I've attempted to read up on it, have had very little luck...
here is the script.. It pretty much just proccesses everything in between the <form> tags and spits it out nicely in an email. Posting the script probably isn't even relevant, as I guess im just looking to figure out how to use actionscript to connect to it..
<?PHP
$to = "help@taxdebtsolutions.com";
$subject = "Results from your Request Info form";
$headers = "From: Form Mailer";
$forward = 1;
$location = "thankyou.html";
$date = date ("l, F jS, Y");
$time = date ("h:i A");
$msg = "Below is the result of your feedback form. It was submitted on $date at $time.\n\n";
if ($_SERVER['REQUEST_METHOD'] == "POST") {
foreach ($_POST as $key => $value) {
$msg .= ucfirst ($key) ." : ". $value . "\n";
}
}
else {
foreach ($_GET as $key => $value) {
$msg .= ucfirst ($key) ." : ". $value . "\n";
}
}
mail($to, $subject, $msg, $headers);
header ("Location:$location");
?>
My guess would be to make input text boxes, name them, and then use a button to send the variables to the server. However, how i'd go about doing that is a mystery to me, thus is why im posting. Any help would be great.
mike
here is the script.. It pretty much just proccesses everything in between the <form> tags and spits it out nicely in an email. Posting the script probably isn't even relevant, as I guess im just looking to figure out how to use actionscript to connect to it..
<?PHP
$to = "help@taxdebtsolutions.com";
$subject = "Results from your Request Info form";
$headers = "From: Form Mailer";
$forward = 1;
$location = "thankyou.html";
$date = date ("l, F jS, Y");
$time = date ("h:i A");
$msg = "Below is the result of your feedback form. It was submitted on $date at $time.\n\n";
if ($_SERVER['REQUEST_METHOD'] == "POST") {
foreach ($_POST as $key => $value) {
$msg .= ucfirst ($key) ." : ". $value . "\n";
}
}
else {
foreach ($_GET as $key => $value) {
$msg .= ucfirst ($key) ." : ". $value . "\n";
}
}
mail($to, $subject, $msg, $headers);
header ("Location:$location");
?>
My guess would be to make input text boxes, name them, and then use a button to send the variables to the server. However, how i'd go about doing that is a mystery to me, thus is why im posting. Any help would be great.
mike