Greetings,
I have an issue with a form I made for the company I work for. The head guy wanted to add check-boxes to the form at the last minute before I present this to some top-dogs at another company tomorrow at 1pm. Eek!
I understand sendmail.php functions, and my form works fine with the regular text fields with it's questions. However with the check boxes, I'm left confused.
Here is my sendmail.php code:
<?php
$email = $_REQUEST['email'] ;
$message .= "Name:";
$message .= $_REQUEST['name']."\n\n";
$message .= "Graybar Location:";
$message .= $_REQUEST['graylocation']."\n\n";
$message .= "Project Name:";
$message .= $_REQUEST['projectname']."\n\n";
$message .= "Project Location:";
$message .= $_REQUEST['location']."\n\n";
$message .= "Project Date:";
$message .= $_REQUEST['projectdate']."\n\n";
$message .= "Are you working with a xxxx Salesperson?";
$message .= $_REQUEST['salesperson']."\n\n";
$message .= "If so, who?";
$message .= $_REQUEST['this-is-where-i-dont-know-what-to-put']."\n\n";
$message .= "Specifier (architect, electrical consultant, landscape architect, lighting designer, interior designer, etc.):";
$message .= $_REQUEST['specifier']."\n\n";
$message .= "Manufacturer and catalog number(s):";
$message .= $_REQUEST['catalog']."\n\n";
$message .= "Budget (If Known):";
$message .= $_REQUEST['budget']."\n\n";
$message .= "Have you e-mailed a LAYOUT REQUEST to xxxx?";
$message .= $_REQUEST['layoutreq']."\n\n";
$message .= "If so, when?";
$message .= $_REQUEST['this-is-where-i-dont-know-what-to-put']."\n\n";
$message .= "Is there anything you want to tell us or that you think we should know?";
$message .= $_REQUEST['comments']."\n\n";
mail( "xxxxx@xxxxxxxx.xxx", "XXXX Portal Project Registration Form",
$message, "From: $name <$email>" );
header( "Location: http://www.xxxxxxxx.xxx/xxxx/thankyou.php" );
?>
And here is my form.
<form action="sendmail2.php" method="post">
<table width="480" height="612" border="0" align="center" cellpadding="2" cellspacing="2">
<tr>
<td class="style11"><strong>E-Mail:</strong></td>
<td><label>
<input type="text" name="email" id="email" />
</label></td>
</tr>
<tr>
<td width="53%" class="style11"><strong>Name: </strong></td>
<td width="47%"><label>
<input type="text" name="name" id="name" />
</label></td>
</tr>
<tr>
<td class="style11"><strong>Graybar Location:</strong></td>
<td width="47%"><label>
<input type="text" name="graylocation" id="graylocation" />
</label></td>
</tr>
<tr>
<td class="style11"><strong>Project Name: </strong></td>
<td><label>
<input type="text" name="projectname" id="projectname" />
</label></td>
</tr>
<tr>
<td class="style11"><strong>Project Location:</strong></td>
<td><label>
<input type="text" name="location" id="location" />
</label></td>
</tr>
<tr>
<td class="style11"><strong>Date project is bidding:</strong></td>
<td><label>
<input type="text" name="projectdate" id="projectdate" />
</label></td>
</tr>
<tr>
<td class="style11"><strong>Are you working with a xxxx Salesperson? </strong></td>
<td><label>
<input type="checkbox" name="yes1" id="yes1" />
Yes
<input type="checkbox" name="no1" id="no1" />
No</label></td>
</tr>
<tr>
<td class="style11"><strong>If so, who?</strong></td>
<td><input type="text" name="salesperson" id="salesperson" /></td>
</tr>
<tr>
<td class="style11"><strong>Specifier (architect, electrical consultant, landscape architect, lighting designer, interior designer, etc.):</strong></td>
<td><label>
<input type="text" name="specifier" id="specifier" />
</label></td>
</tr>
<tr>
<td class="style11"><strong>Manufacturer and catalog number(s):</strong></td>
<td><label>
<textarea name="catalog" id="catalog" cols="30" rows="3"></textarea>
</label></td>
</tr>
<tr>
<td class="style11"><strong>Budget (if known): </strong></td>
<td><label>
<input type="text" name="budget" id="budget" />
</label></td>
</tr>
<tr>
<td class="style11"><strong>Have you e-mailed a LAYOUT REQUEST to xxxx? </strong></td>
<td><input type="checkbox" name="yes2" id="yes2" />
Yes
<input type="checkbox" name="no2" id="no2" />
No </td>
</tr>
<tr>
<td class="style11"><strong>If so, when?</strong></td>
<td><label>
<input type="text" name="layoutreq" id="layoutreq" />
</label></td>
</tr>
<tr>
<td class="style11"><strong>Is there anything you want to tell us or that you think we should know?</strong></td>
<td><label>
<textarea name="comments" id="comments" cols="30" rows="3"></textarea>
</label></td>
</tr>
<tr>
<td class="style11"><strong>Submit:</strong></td>
<td><label>
<input type="submit" name="submit" id="submit" value="Submit" />
</label></td>
</tr>
</table>
<br />
<table width="480" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="488"><div align="justify">
<div align="justify"><span class="entry"><strong class="style14"><em>Note</em></strong>: Please submit drawings to <a href="mailto:@aol.com" class="bluelink"><strong>bobatcalcs@aol.com</strong></a></span></div>
</div></td>
</tr>
</table>
<br />
</form>
Any help is appreciated, for I am on a time-crunch!!