I have created a contact form which is working. I now need to add to the same form a hidden field that an affiliate can enter his ID code but this field is not to show on the from itself. Also how do I code it to check to see if there is an ID and send the contact form to a different email address.
<?
// (JS): Make sure the form has been filled out prior to sending the e-mail
if($form_submitted)
{
$addressfrom = "e.com Client Lead <website@e.com>";
$subject = "e.com - Client Inquiry!";
$message = "A client filled out the response form from IP: " . getenv("REMOTE_ADDR") . "\n";
$message .= "First Name: $firstname\nLast Name: $lastname\nBusiness Name: $busname\nBusiness Address: $busaddress\nCity: $city\nState: $state\nCountry: $country\nBusiness Phone: $busphone\nCellular Phone: $cellphone\nBusiness Fax: $busfax\nEmail Address: $email\nBusiness Website URL: $url\nType of Business: $bustype\nHow did you here aboutus: $find\nAre you seeking a foreign corporation?: $select\nWould you like to set up an offshore processing account?: $select2\nAre you currently processing Visa or Mastercard?: $select3\nWhat is your current or expected monthly credit card volume: $ccvolume\nHow long have you been in business: $yrsbusness\nDo you have past processing statements?: $select4\nAre you a subscription business?: $select5\nAre you interested in alternate billing solutions to increase your revenue?: $select6\nDo you want a quote from SCS to process credit cards offshore?: $select7\n Affiliate ID: $affiliate_id\nAdditional Information Request: $comments\n";
mail("sales@e.com", "$subject", $message,"From: $addressfrom\nReply-To: $addressfrom");
header("Location: index.html");
}
?>
<Html>
<head>
</head>
<body>
<form action="\contact.php">
<input type="hidden" name="contact" value="ok">
<table width="517" border="0" cellspacing="0" cellpadding="0" class="z">
<tr>
<td colspan="2" class="z"><font class="z">Please fill out the
form below and an account representative will respond to your
request within 24 hours. Please note that we are on Pacific
Standard Time.</font></td>
</tr>
<tr>
<td width="219"> </td>
<td width="298"> </td>
</tr>
<tr>
<td colspan="2">First Name:
<input type="text" name="firstname">
</td>
</tr>
<tr>
<td colspan="2">Last Name:
<input type="text" name="lastname">
</td>
</tr>
<tr>
<td colspan="2">Business Name:
<input type="text" name="busname">
</td>
</tr>
<tr>
<td colspan="2">Business Address:
<input type="text" name="busaddress">
</td>
</tr>
<tr>
<td colspan="2" height="33">City:
<input type="text" name="city">
</td>
</tr>
<tr>
<td colspan="2">State/Province:
<input type="text" name="state">
</td>
</tr>
<tr>
<td colspan="2" height="2">Country:
<input type="text" name="country">
</td>
</tr>
<tr>
<td colspan="2">Business Phone:
<input type="text" name="busphone">
</td>
</tr>
<tr>
<td colspan="2">Cellular Phone:
<input type="text" name="cellphone">
</td>
</tr>
<tr>
<td colspan="2">Business Fax:
<input type="text" name="busfax">
</td>
</tr>
<tr>
<td colspan="2">Email Address:
<input type="text" name="email">
</td>
</tr>
<tr>
<td colspan="2">Business Website (URL):
<input type="text" name="url">
</td>
</tr>
<tr>
<td colspan="2">Type of Business:
<input type="text" name="bustype">
</td>
</tr>
<tr>
<td colspan="2">How did you here about us:
<input type="text" name="find">
</td>
</tr>
<tr>
<td colspan="2">Are you seeking a foreign corporation?
<select name="select">
<option value="Yes" selected>Yes</option>
<option value="No">No</option>
</select>
</td>
</tr>
<tr>
<td colspan="2">Would you like to set up an offshore processing
account?
<select name="select2">
<option value="Yes" selected>Yes</option>
<option value="No">No</option>
</select>
</td>
</tr>
<tr>
<td colspan="2">Are you currently processing Visa or Mastercard?
<select name="select3">
<option value="Yes" selected>Yes</option>
<option value="No">No</option>
</select>
</td>
</tr>
<tr>
<td colspan="2" class="z">What is your current or expected monthly
credit card volume?
<input type="text" name="ccvolume">
</td>
</tr>
<tr>
<td colspan="2">How long have you been in business?
<input type="text" name="yrsbusness">
</td>
</tr>
<tr>
<td colspan="2">Do you have past processing statements?
<select name="select4">
<option value="Yes" selected>Yes</option>
<option value="No">No</option>
</select>
</td>
</tr>
<tr>
<td colspan="2">Are you a subscription based business?
<select name="select5">
<option value="Yes" selected>Yes</option>
<option value="No">No</option>
</select>
</td>
</tr>
<tr>
<td colspan="2">Are you interested in alternate billing solutions
to increase your revenue?
<select name="select6">
<option value="Yes" selected>Yes</option>
<option value="No">No</option>
</select>
</td>
</tr>
<tr>
<td colspan="2">Do you want a quote from SCS to process credit
cards offshore?
<select name="select7">
<option value="Yes" selected>Yes</option>
<option value="No">No</option>
</select>
</td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td colspan="2">Additional Information Request:<br>
<textarea name="comments" cols="55"></textarea>
</td>
</tr>
<tr>
<td colspan="2">Thank You for your request. An account representative
from SCS Offshore will contact you within 24 hours</td>
</tr>
<tr>
<td colspan="2">
<div align="center">
<input type="hidden" name="form_submitted" value="yes">
<input type="hidden" name="affiliate_id" value="">
<input name="Submit" type="submit" value="Send">
<input type="reset" name="reset" value="Reset">
</div>
</td>
</tr>
</table>
</body>
</html>