nudude Posted June 23, 2006 Share Posted June 23, 2006 Hi. I'm new here and need help about this online form I'm doing. I know this is basic stuff but since I'm not really a programmer, I couldn't understand some of the php samples I've come across.Anyways, I used this php code from a previous form done by someone else and trying to revise it to include some radio buttons. I'd like to have the radio buttons options selected to display in the email when submitted.Here's the code:<tr><td colspan="5"> <? if((isset($Submit)) && ($Submit=="Submit")) { $mailto="email"; $subject="Online inquiry submission from website"; $body="Full Name: ".$FullName."\n"; $body.="Company: ".$Company."\n"; $body.="Company Address: ".$CompanyAddress."\n"; $body.="Contact Phone Number 1: ".$ContactPhoneNumber1.="\n"; $body.="Contact Phone Number 2: ".$ContactPhoneNumber2."\n"; $body.="Mobile Phone Number: ".$MobilePhoneNumber."\n"; $body.="Fax Number: ".$FaxNumber."\n"; $body.="E-mail Address: ".$EmailAddress."\n"; $body.="Shipment Mode: ".$ShipmentMode."\n"; $body.="Shipper: ".$Shipper."\n"; $body.="Consignee: ".$Consignee."\n"; $body.="Port of Loading: ".$PortofLoading."\n"; $body.="Port of Discharge: ".$PortofDischarge."\n"; $body.="Place of Delivery: ".$PlaceofDelivery."\n"; $body.="ItemCommodity: ".$ItemCommodity."\n"; $body.="Quantity: ".$Quantity."\n"; $body.="Measurement: ".$Measurement."\n"; $body.="Gross Weight: ".$GrossWeight."\n"; $body.="Rate Idea: ".$RateIdea."\n"; $body.="Additional Remarks: ".$AdditionalRemarks."\n\n"; $body.="-------------------------------------------------------\n\n"; if($ShipmentMode) { $body.="Shipment Mode ". $ShipmentMode.": \n\n"; if(count($ToLease)>0) { for($i=0;$i<count($ToLease);$i++) { $body.=($i+1).". ".$ToLease[$i]."\n"; } $body.="\n"; } } $body.=$Include; mail($mailto,$subject,$body,"From: ".$EmailAddress."\r\n"."Reply-To:". $EmailAddress); echo "<div align=\"center\" class=\"msg\"><strong>Your inquiry has been sent! Thank you!</strong></div>"; } ?> </td></tr>The ones with radio buttons are in:----------------------------------------------------Shipment: 0 Sea 0 AirPort of Loading: 0 Port 0 DoorPort of Discharge: 0 Port 0 Door----------------------------------------------------The part: if($ShipmentMode) is just an experiment based on the original php but it doesn't work. (Not surprising)So far the data in the text fields are displaying properly (no problem there). It's the radio buttons that I'm totally clueless.Anybody? Quote Link to comment Share on other sites More sharing options...
jvrothjr Posted June 23, 2006 Share Posted June 23, 2006 [code]$body.="Shipper: "; "<input type=radio name=Shipper value='Sea'>Sea"; "<input type=radio name=Shipper value='Air'>Air\n";$body.="Consignee: ".$Consignee."\n";$body.="Port of Loading: "; "<input type=radio name=PortofLoading value='Port'>Post"; "<input type=radio name=PortofLoading value='Door'>Door\n";$body.="Port of Discharge: "; "<input type=radio name=PortofDischarge value='Port'>Port"; "<input type=radio name=PortofDischarge value='Door'>Door\n";$body.="Place of Delivery: ".$PlaceofDelivery."\n";[/code] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.