# Emailing a form with php

**URL:** <https://forum.kirupa.com/t/emailing-a-form-with-php/217740>\
**Category:** Uncategorized\
**Created:** [March 1, 2007, 3:41pm UTC](https://forum.kirupa.com/t/emailing-a-form-with-php/217740 "2007-03-01T15:41:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ipuff](https://avatars.discourse-cdn.com/v4/letter/i/4af34b/32.png) [@ipuff](https://forum.kirupa.com/u/ipuff)\
**Post date:** [March 1, 2007, 3:41pm UTC](https://forum.kirupa.com/t/emailing-a-form-with-php/217740/1 "2007-03-01T15:41:04Z")

</div>

hello,  
I am very new with php and having some problems running this email script. im creating a flash form which gets emailed. can anyone tell me, how can i send this email with all these fields. the action script code is below:

on (release)  
{

import mx.controls.Alert;  
myClickHandler = function (evt){  
if (evt.detail == Alert.OK){

}  
}  
Alert.show(“Thank you very much. Your message has been sent.”, “Reservation Alert”, Alert.OK);

if (pickDateText != undefined && pickTimeText != undefined && dropDateText != undefined && dropTimeText != undefined && vehicleTypeText != undefined && pickLocationText != undefined && dropLocationText != undefined) {

loadVariablesNum (“reservation.php”, 0, “POST”);

}  
}

Here is the php script as well. I think, there is something wrong with the php script. Please check whats wrong.

\<?

$to = [COLOR=#0000ff][email@address.com](mailto:email@address.com)[/COLOR];  
$msg = "Name: $\_POST[pickDateText]

";  
$msg .= "Pick Date: $\_POST[pickDateText]

";  
$msg .= "Pick Time: $\_POST[pickTimeText]

";  
$msg .= "Drop Date: $\_POST[dropDateText]

";  
$msg .= "Drop Time: $\_POST[dropTimeText]

";  
$msg .= "Vehicle Type: $\_POST[vehicleTypeText]

";  
$msg .= "Pick Up Location: $\_POST[$pickLocationText]

";  
$msg .= "Drop Location: $\_POST[dropLocationText]

";

mail($to, $pickDateText,$pickTimeText,$dropDateText,$dropTim eText,$vehicleTypeText,$pickLocationText,$dropLoca tionText, "From: Titans Reservation  
Reply-To: $email  
");

?\>

thanks
