# Mail form - add new fields?

**URL:** https://forum.kirupa.com/t/mail-form-add-new-fields/304907
**Category:** Uncategorized
**Created:** [February 16, 2010, 10:53am UTC](https://forum.kirupa.com/t/mail-form-add-new-fields/304907 "2010-02-16T10:53:11Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![envane](https://avatars.discourse-cdn.com/v4/letter/e/df788c/32.png) [@envane](https://forum.kirupa.com/u/envane)
#### Post date: [February 16, 2010, 10:53am UTC](https://forum.kirupa.com/t/mail-form-add-new-fields/304907/1 "2010-02-16T10:53:11Z")

</div>

Hey all,

I have created a mail form for my AS2 flash website using PHP. To do this I created input fields and the following PHP code:

\<?php  
$name=$\_POST[‘the\_name’];  
$email=$\_POST[‘the\_email’];  
$subject=$\_POST[‘the\_subject’];  
$message=$\_POST[‘the\_message’];  
$name=trim($name);  
$email=trim($email);  
$subject=StripSlashes($subject);  
$message=StripSlashes($message);  
$toaddress=‘envane21@hotmail.com’;

mail($toaddress,$subject,$message, $town, “From: $name \<$email\>”);  
$name=’’;  
$email=’’;  
$subject=’’;  
$message=’’;

?\>

I need to add some more fields on this form. Currently it has Name, email, subject, message. I need to add some extra fields like town and address, is it possible to do this on the block of code I already have or is it something completely different?

I’m asking this because I would prefer to keep the structure of the form I already have, receiving the information on my email, than get involved with SQL

Thanks!
