# PHP contact form please help!

**URL:** https://forum.kirupa.com/t/php-contact-form-please-help/52416
**Category:** programming
**Created:** [May 23, 2004, 7:39pm UTC](https://forum.kirupa.com/t/php-contact-form-please-help/52416 "2004-05-23T19:39:21Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![tucker](https://avatars.discourse-cdn.com/v4/letter/t/8c91f0/32.png) [@tucker](https://forum.kirupa.com/u/tucker)
#### Post date: [May 23, 2004, 7:39pm UTC](https://forum.kirupa.com/t/php-contact-form-please-help/52416/1 "2004-05-23T19:39:21Z")

</div>

im making a contact form but the email output looks like this:

Users Name:  
Users Email:  
Users Referral Number:  
Users Destination:  
Users Comments:

it doesnt show the input that the user put in

heres the form code:

\<form action=“email.php”\>

Name:  
\<br\>  
\<input type=“text” name=“name” size=“50” maxlength=“100”\>\<br\>\<br\>  
Email:\<br\>

\<input type=“text” name=“email” size=“50” maxlength=“100”\>\<br\>\<br\>  
Referral Number:\<br\>  
\<input type=“text” name=“referral” size=“50” maxlength=“100”\>\<br\>\<br\>  
The final destination of this:\<br\>  
\<input type=“text” name=“destination” size=“50” maxlength=“100”\>\<br\>\<br\>

Reason for contacting us in detail:\<br\>  
\<textarea name=“comments” rows=7 cols=46\>\</textarea\>  
\<br\>\<br\>  
Are you a member of our forums?\<br\>  
\<input type=“radio” name="member of forums"value=“Yes”\>Yes\<BR\>  
\<input type=“radio” name="member of forums"value=“No”\>No\<br\>

\<br\>\<br\>  
Are you a member of one of our division’s forums? \<br\>  
\<input type=“radio” name="divisions forums"value=“Yes”\>Yes\<BR\>  
\<input type=“radio” name="division forums"value=“No”\>No\<br\>\<br\>

\<input type=“submit” value=“Submit”\>\<img src=“spacer.gif” width=5 height=1 alt=“spacer”\>  
\<input type=“reset” value=“Reset”\>\</form\>

and heres the php code:

\<?php

$name=$HTTP\_POST\_VARS[‘name’];  
$referral=$HTTP\_POST\_VARS[‘referral’];  
$destination=$HTTP\_POST\_VARS[‘destination’];  
$comments=$HTTP\_POST\_VARS[‘comments’];

$toaddress = ‘contact@cshepherd.net’;  
$subject = ‘Contact Form’;  
$mailcontent = ‘Users Name:’ . $name . "  
"  
. ‘Users Email:’ . $email . "  
"  
. ‘Users Referral Number:’ . $referral . "  
"  
. ‘Users Destination:’ . $destination . "  
"  
. ‘Users Comments:’ . $comments . "  
";  
$fromaddress = ‘From: [contact@cshepherd.net](mailto:contact@cshepherd.net)’;

mail($toaddress, $subject, $mailcontent, $fromaddress);  
?\>
