# Help with php form

**URL:** <https://forum.kirupa.com/t/help-with-php-form/274009>\
**Category:** Uncategorized\
**Created:** [October 23, 2008, 6:12pm UTC](https://forum.kirupa.com/t/help-with-php-form/274009 "2008-10-23T18:12:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![urobertop](https://avatars.discourse-cdn.com/v4/letter/u/e47774/32.png) [@urobertop](https://forum.kirupa.com/u/urobertop)\
**Post date:** [October 23, 2008, 6:12pm UTC](https://forum.kirupa.com/t/help-with-php-form/274009/1 "2008-10-23T18:12:18Z")

</div>

Hello

I’m working designing a website call [wetaviation.com](http://wetaviation.com). I’m having trouble creating my contact form. I try use php and the only confirmation I receive is the error message I place in the php page.

The link to the form is [www.wetaviation.com.mx/contact.htm](http://www.wetaviation.com.mx/contact.htm)

the code I’m using in the mailer.php page is the following:

\<title\>Wet & Dry Aviation\</title\>  
\<?php  
if(isset($\_POST[‘submit’])) {  
$to = “[marketing@republicair.com.mx](mailto:marketing@republicair.com.mx)”;  
$subject = “Wet and Dry Aviation”;  
$name\_field = $\_POST[‘contactName’];  
$name\_field = $\_POST[‘nameGroup’];  
$email\_field = $\_POST[‘email’];  
$name\_field = $\_POST[‘passengers’];  
$dropdown = $\_POST[‘originMonth’];  
$dropdown = $\_POST[‘originDay’];  
$dropdown = $\_POST[‘originYear’];  
$dropdown = $\_POST[‘opcion2Month’];  
$dropdown = $\_POST[‘opcion2Day’];  
$dropdown = $\_POST[‘opcion2Year’];  
$name\_field = $\_POST[‘cityOrigin’];  
$name\_field = $\_POST[‘cityDestination’];  
$dropdown = $\_POST[‘returnMonth’];  
$dropdown = $\_POST[‘returnDay’];  
$dropdown = $\_POST[‘returnYear’];  
$dropdown = $\_POST[‘returnopcion2Month’];  
$dropdown = $\_POST[‘returnopcion2Day’];  
$dropdown = $\_POST[‘returnopcion2year’];  
$message = $\_POST[‘commentsArea’];  
foreach($\_POST[‘check’] as $value) {  
$check\_msg .= "Checked: $value  
";  
}

$body = "From: $name\_field  
Group: $name\_field  
Passengers: $name\_field  
E-Mail: $email\_field  
OriginMonth: $dropdown  
OriginDay: $dropdown  
OriginYear: $dropdown  
OriginMonthOpcion2: $dropdown  
OriginDayOpcion2: $dropdown  
OriginYearOpcion2: $dropdown  
OriginCity: $name\_field  
DestinationCity: $name\_field  
ReturnMonth: $dropdown  
ReturnDay: $dropdown  
ReturnYear: $dropdown  
returnMonthOpcion2: $dropdown  
ReturnDayOpcion2: $dropdown  
ReturnYearOpcion2: $dropdown  
Message:  
$message  
";  
echo “Thank you, your information was succesfuly submited $to!”;  
mail($to, $subject, $body);

} else {  
echo “Sorry, your information was not sent, ERROR”;  
}  
?\>

Could some one please get me hand to figure out why the page is not posting the results. I obviously expect an email to come withthe information I request but as I mentione I only get the error message and not the sucessful confirmation message.

Thank yo very much.

Roberto Patino
