Alright, so basic story, is a website, with an application form, and what im trying to do, is when the user presses the "submit" button, i get an email with all of the information they entered into the field, i *almost* had it working, almost being, when pressing the "submit" button, i would get an email, it would tell me who it was from, and give me my desired subject line, but the email would be completely blank, with no information from the form.
This is a website for a local music festival, prior to this i had next to no experience with any kind of HTML, PHP, etc. Please keep that in mind with replies :).
Im assuming there is something wrong with my mail() script, just not sure exactly what.
Here is my PHP code:
<?php
<!---Requesting variables from the source HTML file----->
$groupname = $_REQUEST['groupname'] ;
$info = $_REQUEST['info'] ;
$size = $_REQUEST['size'] ;
$special = $_REQUEST['special'] ;
$firstname =$_REQUEST['firstname'] ;
$lastname = $_REQUEST['lastname'] ;
$address1 = $_REQUEST['address1'] ;
$address2 = $_REQUEST['address2'] ;
$city = $_REQUEST['city'] ;
$prov = $_REQUEST['prov'] ;
$email = $_REQUEST['email'] ;
$phone1 = $_REQUEST['phone1'] ;
$phone2 = $_REQUEST['phone2'] ;
$phone3 = $_REQUEST['phone3'] ;
$website = $_REQUEST['website'] ;
mail( "user@mailserver.com", "Vendor Application",
$message, "From: $email" );
header( "Location: http://www.thewebsiteimlinkingto.ca/thanks!.html" );
?>
Side note: The $message portion in the mail() was originally, all of the variables from above, separated by commas, so $group, $info, $size, .... etc. That is where i had blank emails coming in. I was playing around with different ideas, and nothing worked.
The relevant code for the form:
<!-----Start Form--->
<hr>
<br>
<br>
<br>
<br>
<form align=left id="myform" method="post" action="send.php">
Name of Company, Individual, or group*: <input type="text" size="15" maxlength="40" name="groupname"> <br/>
Describe what you sell, or the service you provide*: <br/>
<textarea rows="10" cols="30" wrap="physical" name="info">Please Describe your group here....(you can adjust the size of the window by clicking and dragging on the lower right corner!)</textarea><br/>
Our booths are 10x10, and you can request either powered or unpowered. Select "other" if these do not fit your needs, and let us know in the special requirements!*<br/>
<input type="radio" name="size" value="10x10unpowered">10x10 Unpowered $50<br/>
<input type="radio" name="size" value="10x10powered"> 10x10 Powered $75<br/>
<input type="radio" name="size" value="other"> Other<br/>
Describe any special requirements: <br/>
<textarea rows="10" cols="30" wrap="physical" name="special"> Please describe any special requirements you may have</textarea>
<br>
Contact Name*: <input type="text" size="15" maxlength="15" name="firstname"> Last Name*: <input type="text" size="15" maxlength="15" name="lastname"><br/><br/>
Address line 1*:
<input type="text" size="15" maxlength="40" name="address1"> <br/>
Address line 2: <input type="text" size="15" maxlength="40" name="adress2"><br/>
City*: <input type="text" size="10" maxlength="15" name"city">
<br/>
<br/>
Province\Territory*: <select name="prov">
<option> Choose One</option>
<option> Alberta</option>
<option> British Columbia</option>
<option> Manitoba</option>
<option> New Brunswick</option>
<option> Newfoundland & Labrador</option>
<option> North West Territories</option>
<option> Nova Scotia</option>
<option> Nunavut</option>
<option> Ontario</option>
<option> Quebec</option>
<option> Prince Edward Island</option>
<option> Saskatchewan</option
<option> Yukon</option>
</select>
<br/>
<br/>
Email*:<input type="text" size="15" maxlength="30" name="email"><br>
Phone Number: <input type="text" size="4" maxlength="3" name="phone1"> - <input type="text" size="4" maxlength="3" name="phone2"> - <input type="text" size="5" maxlength="4" name="phone3">
<br>
<br>
Website Address:<input type="text" size="15" maxlength="50" name="website">
<br>
<input type="submit" name="submit" value="Submit">
</form>
<!---------End Form------>