# How do I add form fields to contact mailer?

**URL:** <https://forum.kirupa.com/t/how-do-i-add-form-fields-to-contact-mailer/286478>\
**Category:** programming\
**Created:** [April 16, 2009, 2:44am UTC](https://forum.kirupa.com/t/how-do-i-add-form-fields-to-contact-mailer/286478 "2009-04-16T02:44:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rupo](https://avatars.discourse-cdn.com/v4/letter/r/e68b1a/32.png) [@rupo](https://forum.kirupa.com/u/rupo)\
**Post date:** [April 16, 2009, 2:44am UTC](https://forum.kirupa.com/t/how-do-i-add-form-fields-to-contact-mailer/286478/1 "2009-04-16T02:44:04Z")

</div>

hi,  
i am very new to php…basically all i have done is made a simple contact mailer form like the ones in the tutorials section, with an email field,a message textarea, and a submit button. i want to make a form that has many more text fields, and a couple radio buttons. actually, i already have made that longer form, i just cant figure out how to write the php. so how does one add more fields to the php? here is the php for the little form that works:

\<?php

$email = $\_REQUEST[‘email’] ;  
$message = $\_POST[‘message’];

mail( "nandatown@gmail.com", “Contact Form Results”,  
$message, “From: $email” );  
header( “Location: [http://www.nandatown.com/thankyou.html](http://www.nandatown.com/thankyou.html)” );  
?\>

that sends me an email with a message…but how do i add more? lets say i want a field called “city” if i add:  
$city = $\_POST[‘city’];  
to the php, it doesnt show up in the email.

any help is very helpful and appreciated

thanks!
