# Help.. Im Stuck Badly

**URL:** <https://forum.kirupa.com/t/help-im-stuck-badly/304103>\
**Category:** programming\
**Created:** [February 1, 2010, 8:42pm UTC](https://forum.kirupa.com/t/help-im-stuck-badly/304103 "2010-02-01T20:42:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robbieskipton](https://avatars.discourse-cdn.com/v4/letter/r/d78d45/32.png) [@Robbieskipton](https://forum.kirupa.com/u/Robbieskipton)\
**Post date:** [February 1, 2010, 8:42pm UTC](https://forum.kirupa.com/t/help-im-stuck-badly/304103/1 "2010-02-01T20:42:32Z")

</div>

Hi All,  
I am trying to do a contact form, except i cannot get the SEND PHP to work…

The code is below… Its really getting on my nerves. i have been on it for 4 hours now and i still cant get it to work… can anyone point me in the right direction

Hope everyone is ok

Rob Skipton

\<?php  
if(isset($\_POST[‘submit’])) {

```
$to = "Info@bespokemodeldesign.co.uk"; 
$subject = "New Quotation";
$name_field = $_POST['Your_Name'];
$email_field = $_POST['Your_Email'];
$message = $_POST['Message'];
    $dropdown = $_POST['Host'];

foreach($_POST['check'] as $value) {
    $check_msg .= "Checked: $value

```

";  
}

$body = "From: $name\_field  
E-Mail: $email\_field  
$check\_msg Option: $option  
Drop-Down: $dropdown  
Message:  
$message  
";

```
echo "Data has been submitted to $to!";
mail($to, $subject, $body);

```

} else {  
echo “Sorry, There has been an error, please try again!”;  
}  
?\>

And here is the code for the html form.-------------------------------

\<form id=“form1” name=“Quote” method=“post” action=“Send.php”\>  
\<p\>  
\<label\>  
\<div align=“center”\>Your Name\<br /\>  
\<input name=“Your\_Name” type=“text” id=“Your\_Name” size=“40” maxlength=“15” /\>  
\</label\>  
\<p align=“center”\>  
\<label\>Buisness Name\<br /\>  
\<input name=“Your\_Buisness” type=“text” id=“Your\_Buisness” size=“40” maxlength=“20” /\>  
\</label\>  
\</p\>  
\<p align=“center”\>  
\<label\>Email\<br /\>  
\<input name=“Your\_Email” type=“text” id=“Your\_Email” size=“40” maxlength=“20” /\>  
\</label\>  
\</p\>  
\<p align=“center”\>  
\<label\>Best Number To Contact You On\<br /\>  
\<input name=“Your\_Number” type=“text” id=“Your\_Number” size=“40” maxlength=“20” /\>  
\</label\>  
\</p\>  
\<p align=“center”\>  
\<label\>Address Line 1\<br /\>  
\<input name=“AddressL1” type=“text” id=“AddressL1” size=“40” maxlength=“25” /\>  
\</label\>  
\</p\>  
\<p align=“center”\>  
\<label\>Address Line 2\<br /\>  
\<input name=“AddressL2” type=“text” id=“AddressL2” size=“40” maxlength=“25” /\>  
\</label\>  
\</p\>  
\<p align=“center”\>  
\<label\>Town/City\<br /\>  
\<input name=“Town” type=“text” id=“Town” size=“40” maxlength=“25” /\>  
\</label\>  
\</p\>  
\<p align=“center”\>  
\<label\>Post Code\<br /\>  
\<input name=“Post” type=“text” id=“Post” size=“30” maxlength=“10” /\>  
\</label\>  
\</p\>  
\<p align=“center”\>  
\<label\>What do you require?\<br /\>  
\<select name=“What\_Required” size=“1” id=“What\_Required”\>  
\<option value=“New” selected=“selected”\>A New Website\</option\>  
\<option value=“Update”\>Update Of Old Website\</option\>  
\</select\>  
\</label\>  
\</p\>  
\<p align=“center”\>  
\<label\>Existing URL ( If applicable)\<br /\>  
\<input name=“Existing” type=“text” id=“Existing” size=“40” maxlength=“30” /\>  
\</label\>  
\</p\>  
\<p align=“center”\>  
\<label\>Will you require web hosting\<br /\>  
\<select name=“Host” id=“Host”\>  
\<option value=“Yes” selected=“selected”\>Yes, Both Domain Name and host\</option\>  
\<option value=“Domain”\>Domain Name Only\</option\>  
\<option value=“Host”\>Host Only\</option\>  
\<option value=“Already”\>I already Have domain name and hosting\</option\>  
\</select\>  
\</label\>  
\</p\>  
\<p align=“center”\>  
\<label\>Other Information \* (Please enter as much detail as you are able to at this stage)  
\<textarea name=“Message” id=“Message” cols=“100” rows=“15”\>\</textarea\>  
\</label\>  
\</p\>  
\<p align=“center”\>  
\<input type=“submit” name=“Submit” id=“Submit” value=“Submit” /\>  
\</p\>  
\</form\>
