hello
following is my code to add data to database from selecting checkbox bt its not working can u plz help me????
suggest ny changes asap
thnks in advance
<?php
mysql_connect("localhost","root","")or die(mysql_error());
//echo"connection with mysql";
mysql_select_db("cater") or die(mysql_error());
//echo"database cater connected";
foreach ($_POST['check'] as $k=>$c)
$query="select * from wed_sweets";
$result=mysql_query($query) or die(mysql_error());
if($_POST['submit']=='submit')
{
{
if($c=='on')
{
while($k=mysql_fetch_array($result))
{
echo"$row[FName] "."$row[LName]";
echo "$row[item_name]"."$row[price]";
}
}
}
}
?>