Hi there, I’m trying to create a PHP form and it always selects the first option when you select a radio button can anyone help?
[php]/**
- Quotation Page
*/
global $company;
if (isset($_REQUEST[‘function’])&&$_REQUEST[‘function’]==‘add’ ) {
if (isset($_REQUEST[‘fullname’])) {
$fullname = $_REQUEST[‘fullname’];
}
if (isset($_REQUEST[‘streetaddress’])) {
$streetaddress = $_REQUEST[‘streetaddress’];
}
if (isset($_REQUEST[‘city’])) {
$city = $_REQUEST[‘city’];
}
if (isset($_REQUEST[‘postalcode’])) {
$postalcode = $_REQUEST[‘postalcode’];
}
if (isset($_REQUEST[‘telephone’])) {
$telephone = $_REQUEST[‘telephone’];
}
if (isset($_REQUEST[‘faxnumber’])) {
$faxnumber = $_REQUEST[‘faxnumber’];
}
if (isset($_REQUEST[‘emailaddress’])) {
$emailaddress = $_REQUEST[‘emailaddress’];
}
if (isset($_REQUEST[‘response’])) {
$response = $_REQUEST[‘response’];
}
if (isset($_REQUEST[‘horsename’])) {
$horsename = $_REQUEST[‘horsename’];
}
if (isset($_REQUEST[‘sirename’])) {
$sirename = $_REQUEST[‘sirename’];
}
if (isset($_REQUEST[‘damname’])) {
$damname = $_REQUEST[‘damname’];
}
if (isset($_REQUEST[‘sex’])) {
$sex = $_REQUEST[‘sex’];
}
if (isset($_REQUEST[‘age’])) {
$age = $_REQUEST[‘age’];
}
if (isset($_REQUEST[‘horse’])) {
$horse = $_REQUEST[‘horse’];
}
if (isset($_REQUEST[‘purchaseprice’])) {
$purchasePrice = $_REQUEST[‘purchaseprice’];
}
if (isset($_REQUEST[‘insureamount’])) {
$insureamount = $_REQUEST[‘insureamount’];
}
if (isset($_REQUEST[‘comments’])) {
$comments = $_REQUEST[‘comments’];
}
if (isset($_REQUEST[‘replymail’])) {
$replymail = $_REQUEST[‘replymail’];
}
$disp = ‘
Request a Quote | |
Full name: | ’.$fullname.’ |
Street Address: | ’.$streetaddress.’ |
City: | ’.$city.’ |
Postal Code: | ’.$postalcode.’ |
Telephone: | ’.$telephone.’ |
Fax Number: | ’.$faxnumber.’ |
email Address: | ’.$emailaddress.’ |
Response: | ’.$response.’ |
Horse Name: | ’.$horsename.’ |
Sire Name: | ’.$sirename.’ |
Dam Name: | ’.$damname.’ |
Sex: | ’.$sex.’ |
Age: | ’.$age.’ |
Horse: | ’.$horse.’ |
Purchase Price: | ’.$purchaseprice.’ |
Insure Amount: | ’.$insureamount.’ |
Comments: | ’.$comments.’ |
Comments: | ’.$replymail.’ |
$message = new Message();
$message->setCompanyId($company->getCompanyID());
$message->setCampaignId(0);
$message->setContactId(0);
$message->setMesageTemplateId(0);
$message->setMessageSubject("Request a Quote: ".$fullname);
$message->setMessageType(“EMAIL”);
$message->setMessageBilled(“0”);
$message->setMessageText($disp);
$message->setEmail_sms(‘The recipients email address goes here’);
$message->setMessageCost(“0.23”);
$message->setMessageDate(date(‘Y-m-d H:i:s’));
$message->setStatus(“QUEUED”);
$sc = $message->save();
?>
Back home
Request a quote
-
Thank you <?= $full_name ?>, your request will be dealt with shortly
Back home
Request a quote
- Name
- Street Address
- City
- Postal Code
- Telephone
- Fax
- Email Address
-
How would you like to respond?
Email Phone Fax - Name of the horse insured?
- Sire
- Dam
-
Sex
Stallion Gelding - Age
-
Type of horse:
Racing Breeding Showjumping Dressage Showing Eventing Endurance Hacking Equitation Polo Polocrosse Other
[/php]</tr> </table> </li> <li> <strong>Purchase price of horse:</strong> <input name='purchaseprice' id='purchaseprice' size='20' class="quoteinput"> </li> <li> <strong>Value you would like to insure for:</strong> <input name='insureamount' id='insureamount' size='20' class="quoteinput"> </li> <li> <strong>Comments or queries:</strong> </li> <li> <textarea cols='30' rows='5' name='comments' id='comments' class="quoteinput"></textarea> </li> <li> <strong>Would you like an email to confirm your mail?</strong> <table align="right"> <tr> <td><input type='checkbox' id='replymail' name='replymail' value='reply'></td> </tr> </table> </li> <li> <input type="Button" onClick='SendQuote()' name="submit" value="" class="submitbutton"> </li> </ul> </form> </div><!--Left Col-->