hello, i am new to the board and new to php. Just hoping for a bit of help.
I have a form that has a few textfields along with multiple checkboxes with textares's to be inserted in to a mysql db yet i only want the info in the textarea to be included if the checkbox next to it is checked. I hav figured out a little something, or i think i have... code below id there a better way?
I have yet to try to figure out how to build the sql query so any help there would be great!
php code:
$company=$_POST['company'];
$header=$_POST['header'];
$sub_header=$_POST['sub_header'];
$main_offer=$_POST['main_offer'];
$offer2=$_POST['offer2'];
$offer3=$_POST['offer3'];
$offer4=$_POST['offer4'];
$offer5=$_POST['offer5'];
$offer6=$_POST['offer6'];
$footer=$_POST['footer'];
$disclaimer==$_POST['disclaimer'];
$expire=$_POST['expire'];
$address=$_POST['address'];
$notes=$_POST['notes'];
$offer[0] = $offer2;
$offer[1] = $offer3;
$offer[2] = $offer4;
$offer[3] = $offer5;
$offer[4] = $offer6;
$count=count($offer);
for ($i=0; $i<$count; $i++) {
echo "<br>".$offer[$i]."<br>";
}
the html page is located here:
http://www.365mt.com:8080/jtl.php
the link i also a live version of above code.