# PHP Form tute edit question

**URL:** <https://forum.kirupa.com/t/php-form-tute-edit-question/266934>\
**Category:** programming\
**Created:** [July 25, 2008, 6:59pm UTC](https://forum.kirupa.com/t/php-form-tute-edit-question/266934 "2008-07-25T18:59:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![XGD](https://avatars.discourse-cdn.com/v4/letter/x/d2c977/32.png) [@XGD](https://forum.kirupa.com/u/XGD)\
**Post date:** [July 25, 2008, 6:59pm UTC](https://forum.kirupa.com/t/php-form-tute-edit-question/266934/1 "2008-07-25T18:59:36Z")

</div>

Hello,  
I have tried to edit the HTML/PHP contact form from the tutorial but it didnt work out.

Basically, i dont need the check boxes and radio buttons, but the 3 text fields that are already there and TWO drop down lists (there is one in the tutorial). I changed the code to this (and added of course one more list which i named drop\_down2,and a $dropdown2 variable in the PHP file).

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

$to = [my@myself.com](mailto:my@myself.com);  
$subject = “Form Tutorial”;  
$name\_field = $\_POST[‘name’];  
$email\_field = $\_POST[‘email’];  
$message = $\_POST[‘message’];  
$dropdown = $\_POST[‘drop\_down’];  
$dropdown2 = $\_POST[‘drop\_down2’]  
$body = "From: $name\_field  
E-Mail: $email\_field  
Drop-Down: $dropdown  
Drop-Down2: $dropdown2  
Message:  
$message  
";  
echo “Data has been submitted to $to!”;  
mail($to, $subject, $body);  
} else {  
echo “blarg!”;  
}  
?\>

When i click submit, i get an error. Please help me!

p.s.  
I tried the form on my server and it works fine when i copy paste everything, i just cant get it to suit my needs (throw out the check boxes and radio buttons and add one more drop down list).
