Ok, I will be the first to admit I am not too savvy with PHP. That being said, I was hoping for some quick help, I dont think it is too difficult, but I cant seem to come up with search results to find my answer.
My html is posting just fine to the php script, it emails, and all is well except for one thing. I have fields in the form that do not need to be filled out, and there are about 40 fields. When it gets mailed to me and if they dont fill in lets say, 30 of the 40+ fields, the entire thing gets emailed to me with no info put in those blank spots but it still has its labled that I provided it so it looks like:
Addreess:
Phone:
With 40+ of these its gets kind of hard to find the information they provided that I need, and I am worried Ill skip over something.
So the way I have it setup is just not working for me and I was wondering if there is something relatively simple I could put in the PHP script for (if the field is blank display nothing) I dont know if this will work with how I have it setup (its pretty basic)
But I have provided a SLIMMED down portion of the code that should answer any questions one may have about it.
So thank you for any advice you can give! Have a great day.. or night depending on where your at!
[PHP]<?php
$FirstName = $_REQUEST['FirstName'];
$LastName = $_REQUEST['LastName'];
$City = $_REQUEST['City'];
$State = $_REQUEST['State'];
$Zip = $_REQUEST['Zip'];
$HomePhone = $_REQUEST['HomePhone'];
$CellPhone = $_REQUEST['CellPhone'];
$Email = $_REQUEST{'Emai l'} ;
$Comments = $_REQUEST{'Comm ents'} ;
mail( "mbates@tblrock .com,", "Table Rock Restaurants Form Submission",
"First Name: $FirstName\n
Last Name: $LastName\n
City: $City\n
State: $State\n
Zip: $Zip\n
Home Phone: $HomePhone\n
Cell Phone: $CellPhone\n
Email Address: $Email\n
Comments from $FirstName $LastName : $Comments",
"From: user@website.co m" );
header( "Location: http://www.website.com " );
?>[/PHP]
My html is posting just fine to the php script, it emails, and all is well except for one thing. I have fields in the form that do not need to be filled out, and there are about 40 fields. When it gets mailed to me and if they dont fill in lets say, 30 of the 40+ fields, the entire thing gets emailed to me with no info put in those blank spots but it still has its labled that I provided it so it looks like:
Addreess:
Phone:
With 40+ of these its gets kind of hard to find the information they provided that I need, and I am worried Ill skip over something.
So the way I have it setup is just not working for me and I was wondering if there is something relatively simple I could put in the PHP script for (if the field is blank display nothing) I dont know if this will work with how I have it setup (its pretty basic)
But I have provided a SLIMMED down portion of the code that should answer any questions one may have about it.
So thank you for any advice you can give! Have a great day.. or night depending on where your at!
[PHP]<?php
$FirstName = $_REQUEST['FirstName'];
$LastName = $_REQUEST['LastName'];
$City = $_REQUEST['City'];
$State = $_REQUEST['State'];
$Zip = $_REQUEST['Zip'];
$HomePhone = $_REQUEST['HomePhone'];
$CellPhone = $_REQUEST['CellPhone'];
$Email = $_REQUEST{'Emai l'} ;
$Comments = $_REQUEST{'Comm ents'} ;
mail( "mbates@tblrock .com,", "Table Rock Restaurants Form Submission",
"First Name: $FirstName\n
Last Name: $LastName\n
City: $City\n
State: $State\n
Zip: $Zip\n
Home Phone: $HomePhone\n
Cell Phone: $CellPhone\n
Email Address: $Email\n
Comments from $FirstName $LastName : $Comments",
"From: user@website.co m" );
header( "Location: http://www.website.com " );
?>[/PHP]
Comment