I’m new to PHP and have just created a contact form. I’d like to add additional fields that are included in the email.
I put the fields into the html – there are 8 in total. I just don’t know how to create the php to display the additional info.
[B]Here is the Form:
[code=html]<form onSubmit=”return checkForm();” method=post action=”sendmail.php”>
Name: <input name=”name” type=”text” size=”40″ value=”” id=name>
Organization: <input name=”org” type=”text” size=”40″ value=”” id=org>
City: <input name=”city” type=”text” size=”20″ value=”” id=city>
State: <input name=”org” type=”text” size=”5″ value=”” id=org>
Zip: <input name=”zip” type=”text” size=”8″ value=”” id=zip>
Phone: <input name=”phone” type=text value=”” id=phone>
Email: <input name=”email” type=text value=”” id=email>
Message: <textarea name=”message” type=text value=”” id=message rows=”8″ cols=”40″></textarea>
</form>
I think the way I’m doing it only allows for 4 parameters to send in the email(my email address, the email subject, the message, and the from-email address.) How would I make it so that the $message contains ‘message’ ‘phone’ ‘city’ ‘state’ etc? (from the form)
[B]This is the PHP (sendmail.php):
[code=php]<?php
$email = $_REQUEST[’email’] ;
$message = $_REQUEST[‘message’] ;
mail( “[email protected]”, “Email Subject”,
“$message”, “From: $email”);
header( “Location:contact_thanks.php” );
?>
Any help is much appreciated, thanks!