PHP Check boxes
Posted: Fri Jan 18, 2008 8:36 am
Hi all, I was looking to use check boxes in a html form for a registration page.
HTML Code:
<input type="checkbox" name="Industry" value="Ecommerce" /></input><label for="Ecommerce">Ecommerce</label>
<input type="checkbox" name="Industry" value="IT - Web Design" /></input><label for="IT - Web Design">IT - Web Design</label>
PHP Code
$insert = mysql_query("insert into $table values ('NUll',
'".$_POST['CompanyName']."',
'".$_POST['Address']."',
'".$_POST['Town']."',
'".$_POST['PostCode']."',
'".$_POST['Telephone']."',
'".$_POST['Fax']."',
'".$_POST['Url']."',
'".$_POST['Email']."',
'".$_POST['Industry']."',
'".$_POST['Description']."')")
or die ("Could not insert ".mysql_error());
the mysql all i see is "array".
Any help would be great
many thanks
James
HTML Code:
<input type="checkbox" name="Industry" value="Ecommerce" /></input><label for="Ecommerce">Ecommerce</label>
<input type="checkbox" name="Industry" value="IT - Web Design" /></input><label for="IT - Web Design">IT - Web Design</label>
PHP Code
$insert = mysql_query("insert into $table values ('NUll',
'".$_POST['CompanyName']."',
'".$_POST['Address']."',
'".$_POST['Town']."',
'".$_POST['PostCode']."',
'".$_POST['Telephone']."',
'".$_POST['Fax']."',
'".$_POST['Url']."',
'".$_POST['Email']."',
'".$_POST['Industry']."',
'".$_POST['Description']."')")
or die ("Could not insert ".mysql_error());
the mysql all i see is "array".
Any help would be great
many thanks
James