hi friends,
here is my problem i'm designing a page with no. of checkboxes but not able to insert its value in mysql...
here is my php code:

**<?php
$host="host"; // Host name 
$username="root"; // Mysql username 
$password=""; // Mysql password 
$db_name="packtest"; // Database name 
$tbl_name="test"; // Table name

// Connect to server and select database.
mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");

// Get values from form 
$user_id=mysql_real_escape_string($_POST['user_id']); 
$granules=mysql_real_escape_string($_POST['granules']); 
$master_batch=mysql_real_escape_string($_POST['master_batch']); 
$fmcg application=mysql_real_escape_string($_POST['fmcg application']); 
$pharma application=mysql_real_escape_string($_POST['pharma application']);  
$pvc films=mysql_real_escape_string($_POST['pet films']);  
$pe films=mysql_real_escape_string($_POST['pe films']);  
$pp films=mysql_real_escape_string($_POST['pp films']);  
$pre formed pouches=mysql_real_escape_string($_POST['pre formed pouches']);  
$pet containers=mysql_real_escape_string($_POST['pet containers']);  
$pp containers=mysql_real_escape_string($_POST['pp containers']);  
$hdpe containers=mysql_real_escape_string($_POST['hdpe containers']);  
$ps containers=mysql_real_escape_string($_POST['ps containers']);  
$blister packs=mysql_real_escape_string($_POST['blister packs']);  
$thermoformed trays,boxes=mysql_real_escape_string($_POST['thermoformed trays,boxes']);  
$wad=mysql_real_escape_string($_POST['wad']);  
$plastic caps & closures=mysql_real_escape_string($_POST['plastic caps & closures']);  
$metal caps=mysql_real_escape_string($_POST['metal caps']);  
$aerosol systems=mysql_real_escape_string($_POST['aerosol systems']);  
$a1.collapsible tubes=mysql_real_escape_string($_POST['a1.collapsible tubes']);  
$pharma application=mysql_real_escape_string($_POST['pharma application']);  
$lamitubes=mysql_real_escape_string($_POST['lamitubes']);  
$cartons=mysql_real_escape_string($_POST['cartons']);  
$al. cans=mysql_real_escape_string($_POST['al. cans']);  
$al.foil=mysql_real_escape_string($_POST['al.foil']);  
$tin containers=mysql_real_escape_string($_POST['tin containers']);  
$drums & barrels=mysql_real_escape_string($_POST['drums & barrels']);  
$kraft/semi-kraft=mysql_real_escape_string($_POST['kraft/semi-kraft']);  
$bleached=mysql_real_escape_string($_POST['bleached']);  
$speciality paper=mysql_real_escape_string($_POST['speciality paper']);  
$bottles/jars=mysql_real_escape_string($_POST['bottles/jars']); 
$ampoules/vials=mysql_real_escape_string($_POST['ampoules/vials']); 
$grey back board=mysql_real_escape_string($_POST['grey back board']); 
$white back board=mysql_real_escape_string($_POST['white back board']); 
$speciality back board=mysql_real_escape_string($_POST['composite cans']); 
$composite cans=mysql_real_escape_string($_POST['bottles/jars']); 
$multi wallpaper bag=mysql_real_escape_string($_POST['multi wallpaper bag']); 
$paper cups=mysql_real_escape_string($_POST['paper cups']); 
$labelstock=mysql_real_escape_string($_POST['labelstock']); 
$plastic label printers=mysql_real_escape_string($_POST['plastic label printers']); 
$paper label printers=mysql_real_escape_string($_POST['paper label printers']); 
$shrink label/sleeves=mysql_real_escape_string($_POST['shrink label/sleeves']); 
$inks/pigments=mysql_real_escape_string($_POST['inks/pigments']); 
$adhesives=mysql_real_escape_string($_POST['adhesives']); 
$lacquers & coatings=mysql_real_escape_string($_POST['lacquers & coatings']); 
$prototyping=mysql_real_escape_string($_POST['prototyping']); 
$graphic designing=mysql_real_escape_string($_POST['graphic designing']); 
$testings=mysql_real_escape_string($_POST['testings']); 
$proofing/cylinder=mysql_real_escape_string($_POST['proofing/cylinder']); 
$instruments callibration services=mysql_real_escape_string($_POST['instruments callibration services']); 
$consultancy services=mysql_real_escape_string($_POST['consultancy services']); 
$package testing equipment=mysql_real_escape_string($_POST['package testing equipment']); 
$package converting machine=mysql_real_escape_string($_POST['package converting machine']); 
$forming & filling equipment=mysql_real_escape_string($_POST['forming & filling equipment']); 
$packaging machines=mysql_real_escape_string($_POST['packaging machines']); 
$barcoding services=mysql_real_escape_string($_POST['barcoding services']); 
$rfid=mysql_real_escape_string($_POST['rfid']); 
$holograms=mysql_real_escape_string($_POST['holograms']); 



// Insert data into mysql
$sql="INSERT INTO $tbl_name(user_id, granules, master_batch, fmcg application, pharma application, pvc films, pe films, pp films, pre formed pouches, pet containers, pp containers, hdpe containers, ps containers, 
blister packs, thermoformed trays/boxes,
wad,
plastic caps & closures,  
metal caps,
aerosol systems,
a1.collapsible tubes,
pharma application,
lamitubes=mysql_real_escape_string,
cartons, 
al. cans,  
al.foil,
tin containers, 
drums & barrels, 
kraft/semi-kraft, 
bleached,
speciality paper,
bottles/jars,
ampoules/vials,
grey back board,
white back board,
speciality back board,
composite cans,
multi wallpaper bag,
paper cups,
cartons,
labelstock,
plastic label printers,
paper label printers,shrink label/sleeves,  
inks/pigments, 
adhesives,
lacquers & coatings,
prototyping,
graphic designing,
testings,
proofing/cylinder,
instruments callibration services,
consultancy services,
package testing equipment,
package converting machine, 
forming & filling equipment,
packaging machines,
barcoding services,
rfid,
holograms) VALUES('$user_id', '$granules', '$master_batch', '$fmcg application', '$pharma application', '$pvc films', '$pe films', '$pp films, '$pre formed pouches', '$pet containers', '$pp containers', '$hdpe containers', '$ps containers', 
'$blister packs', '$thermoformed trays/boxes',
'$wad',
'$plastic caps & closures',  
'$metal caps',
'$aerosol systems',
'$a1.collapsible tubes',
'$pharma application',
'$lamitubes=mysql_real_escape_string',
'$cartons', 
'$al. cans',  
'$al.foil',
'$tin containers', 
'$drums & barrels', 
'$kraft/semi-kraft', 
'$bleached',
'$speciality paper',
'$bottles/jars',
'$ampoules/vials',
'$grey back board',
'$white back board',
'$speciality back board',
'$composite cans',
'$multi wallpaper bag',
'$paper cups',
'$cartons',
'$labelstock',
'$plastic label printers',
'$paper label printers', '$shrink label/sleeves',  
'$inks/pigments', 
'$adhesives',
'$lacquers & coatings',
'$prototyping',
'$graphic designing',
'$testings',
'$proofing/cylinder',
'$instruments callibration services',
'$consultancy services',
'$package testing equipment',
'$package converting machine', 
'$forming & filling equipment',
'$packaging machines',
'$barcoding services',
'$rfid',
'$holograms')"; 
$result=mysql_query($sql);

// if successfully insert data into database, displays message "Successful".
if($result){
echo "Successful";
echo "<BR>";
echo "<a href='testpage.html'>Back to main page</a>";
}

else {
echo "ERROR";
}
?>

<?php
// close connection
mysql_close();
?>**

And html code:

  **<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<link href="file:///D|/website/packfinder/footer.css" rel="stylesheet" type="text/css" />
<link href="footer.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.style116 {font-family: Arial, Helvetica, sans-serif}
.style129 {font-size: 20px}
.style238 {
    font-size: 12px;
    font-weight: bold;
}
.style239 {font-size: 12px}
-->
</style>
</head>

<title>packfinder</title>
<link href="file:///C|/Documents and Settings/user/Desktop/csss.css" rel="stylesheet" type="text/css" />
<link href="file:///C|/Documents and Settings/user/My Documents/Unnamed Site 4/csss.css" rel="stylesheet" type="text/css" />
<div align="center" style="border:0px"></div>
<style type="text/css">
<!--
body {
    background-image: url(images/79237_tekstury_stena_oboi_lampy_svet_pol_kreativ_2560x1600_(www.GdeFon.ru).jpg);
    background-color: #FFFFFF;
    background-image: url(images/90.jpg);
    background-repeat: repeat;
    margin-left: 5px;
}
.style33 {font-family: Georgia, "Times New Roman", Times, serif; color: #FFFFFF; font-weight: bold; font-size: 60px; font-style: italic; }
.style41 {
    color: #FFFFFF;
    font-weight: bold;
    font-style: italic;
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 25px;
}
.style68 {font-style: italic; font-size: 16px; font-family: Georgia, "Times New Roman", Times, serif;}
.style75 {font-size: 40px}
.style79 {
    color: #000000;
    font-family: Georgia, "Times New Roman", Times, serif;
    font-style: italic;
    font-size: 16px;
}
.style83 {font-size: 25px}
.paragraph {
    color: #800000;
}
.style229 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    color: #990000;
}
.style237 {color: #990000}
.style110 {color: #666666}
.style111 {color: #333333}
.style113 {color: #333333; font-family: Arial, Helvetica, sans-serif; }
.style115 {
    color: #333333;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: bold;
    font-size: 22px;
}
.style118 {font-size: 12}
.style125 {font-size: 11px; font-family: Arial, Helvetica, sans-serif; font-weight: bold; }
.style126 {font-size: 11px}
.style128 {
    font-size: 20px;
    font-weight: bold;
}
.style130 {font-size: 11px; font-family: Arial, Helvetica, sans-serif; }
-->
</style>
</head>

<body>

<table width="995" height="98" border="0" cellpadding="0" cellspacing="0">
    <tr>

      <th width="120" rowspan="2" valign="top" bgcolor="#990000" class="style33" scope="col"><img src="images/logopf.jpg" width="120" height="120" border="0"/></th>
      <th width="754" height="58" valign="middle" bgcolor="#990000" class="style33" scope="col"><span class="style75">Packfinder</span><br /></th>
      <th width="121" rowspan="2" bgcolor="#990000" class="style33" scope="col"><img src="http://www.packfinder.in/images/Earth.jpg" width="120" height="120" border" /></th>
    </tr>
    <tr>
<th height="40" valign="middle" bgcolor="#990000" class="style41" scope="col"><MARQUEE> 
        <span class="style83">Your doorway to the world of packaging        </span></MARQUEE></th>
    </tr>

</table>
<br />
<table width="999" border="1">
  <tr>
    <th width="995" height="56" bgcolor="#E9E9E9"><div align="center" class="style68"><span class="style79"><strong>Looking for information about what is </strong></span><strong>happening in the packaging arena &amp; wondering where to look for??<br />
    Your quest to all<span class="style79"> that is to packaging ends here!!!</span></strong></div></th>
  </tr>
</table>
<br />
<table width="974" border="0" cellpadding="0" cellspacing="0">
  <tr> <menu></menu>
      <th width="85" bgcolor="#FFFFFF" border:="border:" inside;="inside;" scope="row"><div align="left"><a href="index.html"><img src="images/home.jpg" width="83" height="30" border="0" /></a></div></th>
    <th width="85" bgcolor="#FFFFFF" scope="row"><div align="left"><a href="aboutus.html"><img src="images/about us.jpg" width="83" height="30" border="0" /></a></div></th>
    <th width="85" bgcolor="#FFFFFF" scope="row"><div align="left"><img src="images/services2.jpg" width="83" height="30" /></div></th>
    <th width="85" bgcolor="#FFFFFF" scope="row"><div align="left"><a href="contact us.html"><img src="images/contactus2.jpg" width="83" height="30" /></a></div></th>
    <th width="154" scope="row"><div align="left"><img src="images/fd.jpg" width="83" height="30" border="0" /></div></th>
    <th width="79" height="28" scope="row"><a href="http://www.packfinder.in/blog"><img src="images/images (2).jpg" width="60" height="18" /></a></th>
    <th width="86" bgcolor="#FFFFFF" scope="row"><a href="http://www.twitter.com"><img src="images/tw.jpg" width="60" height="18" border="0" /></a></th>
    <th width="82" bgcolor="#FFFFFF" scope="row"><a href="http://www.linked.com"><img src="images/linkdin.jpg" width="60" height="18" border="0" /></a></th>
    <th width="77" bgcolor="#FFFFFF" scope="row"><a href="http://www.facebook.com"><img src="images/facebook.jpg" width="60" height="18" border="0" /></a></th>
    <th width="156" bgcolor="#FFFFFF" scope="row">
          <form action="loginpage.html" method="post" class="style229">
            <a href="loginpage.php"><img src="images/member.jpg" width="112" height="19" border="0" /></a>
        </form></th>
  </tr>
</table>
<form name="forname" methode="post" action="#">
<div ><span class="style115"><br />
    <span class="style129">Categories</span><br />
    <br />
  </span>
  <table width="1000" height="139" border="1" cellpadding="0" cellspacing="0" bordercolor="#EEEEEE">
    <tr>
      <th width="98" height="44" scope="row"><div align="center" class="style125">Granuels</div></th>
      <th width="24" scope="row"><div align="center" class="style116">
          <input name="options3" type="CHECKBOX" value="1"/>
      </div></th>
      <td width="80"><div align="right" class="style126 style116">
          <div align="center"><strong>Master Batch </strong></div>
      </div></td>
      <td width="29"><div align="center" class="style130">
          <input name="options3" type="CHECKBOX" value="2"/>
      </div></td>
      <td width="118"><div align="right" class="style126 style116">
          <div align="center"><strong>FMCG Applicatin </strong></div>
      </div></td>
      <td width="31"><div align="center" class="style130">
          <input name="options3" type="CHECKBOX" value="3"/>
      </div></td>
      <td width="126"><span class="style126 style116"><strong>Pharma Applications </strong></span></td>
      <td width="20"><div align="center" class="style130">
          <input name="options3" type="CHECKBOX" value="4"/>
      </div></td>
      <td width="93"><div align="center" class="style130"><strong>PVC Films </strong></div></td>
      <td width="26"><div align="center" class="style116">
          <input name="options3" type="CHECKBOX" value="5"/>
      </div></td>
      <td width="109"><div align="right" class="style126 style116">
          <div align="center"><strong>PET Films </strong></div>
      </div></td>
      <td width="35"><div align="center" class="style126">
          <input name="options3" type="CHECKBOX" value="6"/>
      </div></td>
      <td width="97"><div align="right" class="style116 style126">
          <div align="center"><strong>PE Films </strong></div>
      </div></td>
      <td width="84"><div align="center" class="style126">
          <input name="options3" type="CHECKBOX" value="7"/>
      </div></td>
    </tr>
    <tr>
      <th height="30" scope="row"><div align="center" class="style125">PP Films </div></th>
      <th scope="row"><div align="center" class="style125">
          <input name="options3" type="CHECKBOX" value="8"/>
      </div></th>
      <td><div align="center" class="style125">Pre Formed pouches </div></td>
      <td><div align="center" class="style125">
          <input name="options3" type="CHECKBOX" value="9"/>
      </div></td>
      <td><div align="center" class="style125">PET Containers </div></td>
      <td><div align="center" class="style125">
          <input name="options3" type="CHECKBOX" value="10"/>
      </div></td>
      <td><div align="center" class="style125">PP Containers </div></td>
      <td><div align="center" class="style125">
          <input name="options3" type="CHECKBOX" value="11"/>
      </div></td>
      <td><div align="center" class="style125">HDPE Containers </div></td>
      <td><div align="center" class="style125">
          <input name="options3" type="CHECKBOX" value="12"/>
      </div></td>
      <td><div align="center" class="style116"><span class="style126"><strong>PS Containers </strong></span> </div></td>
      <td><div align="center"><span class="style126">
          <input name="options3" type="CHECKBOX" value="13"/>
      </span></div></td>
      <td><div align="center" class="style125">
          <div align="center" class="style126">Blister Packs </div>
      </div></td>
      <td><div align="center"><span class="style126">
          <input name="options3" type="CHECKBOX" value="14"/>
      </span></div></td>
    </tr>
    <tr>
      <th width="98" height="44" scope="row"><div align="center" class="style125"><span class="style126">Thermoformed Trays,Boxes </span></div></th>
      <th width="24" scope="row"><div align="center" class="style116">
          <input name="options3" type="CHECKBOX" value="15"/>
      </div></th>
      <td width="80"><div align="right" class="style126 style116">
          <div align="center"><strong>Wad </strong></div>
      </div></td>
      <td width="29"><div align="center" class="style130">
          <input name="options3" type="CHECKBOX" value="16"/>
      </div></td>
      <td width="118"><div align="right" class="style126 style116">
          <div align="center"><strong>Plastic Caps &amp; Closures </strong></div>
      </div></td>
      <td width="31"><div align="center" class="style130">
          <input name="options3" type="CHECKBOX" value="17"/>
      </div></td>
      <td width="126"><div align="center" class="style125">Metal Caps </div></td>
      <td width="20"><div align="center" class="style130">
          <input name="options3" type="CHECKBOX" value="18"/>
      </div></td>
      <td width="93"><div align="center" class="style130"><strong>Aerosol System </strong></div></td>
      <td width="26"><div align="center" class="style116">
          <input name="options3" type="CHECKBOX" value="19"/>
      </div></td>
      <td width="109"><div align="right" class="style126 style116">
          <div align="center"><strong>AI. Collapsible Tubes </strong></div>
      </div></td>
      <td width="35"><div align="center" class="style126">
          <input name="options3" type="CHECKBOX" value="20"/>
      </div></td>
      <td width="97"><div align="right" class="style116 style126">
          <div align="center"><strong>Lamitubes</strong></div>
      </div></td>
      <td width="84"><div align="center" class="style126">
          <input name="options3" type="CHECKBOX" value="21"/>
      </div></td>
    </tr>
    <tr>
      <th width="98" height="44" scope="row"><div align="center" class="style125">Cartons </div></th>
      <th width="24" scope="row"><div align="center" class="style116">
          <input name="options3" type="CHECKBOX" value="22"/>
      </div></th>
      <td width="80"><div align="right" class="style126 style116">
          <div align="center"><strong>AI. Cans </strong></div>
      </div></td>
      <td width="29"><div align="center" class="style130">
          <input name="options3" type="CHECKBOX" value="23"/>
      </div></td>
      <td width="118"><div align="right" class="style126 style116">
          <div align="center"><strong>AI. Foil </strong></div>
      </div></td>
      <td width="31"><div align="center" class="style130">
          <input name="options3" type="CHECKBOX" value="24"/>
      </div></td>
      <td width="126"><div align="right" class="style126 style116">
          <div align="center"><strong>Tin Containers </strong></div>
      </div></td>
      <td width="20"><div align="center" class="style130">
          <input name="options3" type="CHECKBOX" value="25"/>
      </div></td>
      <td width="93"><div align="center" class="style130"><strong>Drums &amp; Barrels</strong></div></td>
      <td width="26"><div align="center" class="style116">
          <input name="options3" type="CHECKBOX" value="26"/>
      </div></td>
      <td width="109"><div align="right" class="style126 style116">
          <div align="center"><strong>Kraft/Semi-kraft</strong></div>
      </div></td>
      <td width="35"><div align="center" class="style126">
          <input name="options3" type="CHECKBOX" value="27"/>
      </div></td>
      <td width="97"><div align="right" class="style116 style126">
          <div align="center"><strong>Bleached</strong></div>
      </div></td>
      <td width="84"><div align="center" class="style126">
          <input name="options3" type="CHECKBOX" value="28"/>
      </div></td>
    </tr>
    <tr>
      <th width="98" height="44" scope="row"><div align="center" class="style125">Speciality Paper </div></th>
      <th width="24" scope="row"><div align="center" class="style116">
          <input name="options3" type="CHECKBOX" value="29"/>
      </div></th>
      <td width="80"><div align="right" class="style126 style116">
          <div align="center"><strong>Bottles/Jars </strong></div>
      </div></td>
      <td width="29"><div align="center" class="style130">
          <input name="options3" type="CHECKBOX" value="30"/>
      </div></td>
      <td width="118"><div align="right" class="style126 style116">
          <div align="center"><strong>Bottles </strong></div>
      </div></td>
      <td width="31"><div align="center" class="style130">
          <input name="options3" type="CHECKBOX" value="31"/>
      </div></td>
      <td width="126"><span class="style116"><span class="style116 style126"></span>
            <div align="right" class="style126 style116">
              <div align="center"><strong>Ampoules/Vials</strong></div>
            </div>
      </span></td>
      <td width="20"><div align="center" class="style130">
          <input name="options3" type="CHECKBOX" value="32"/>
      </div></td>
      <td width="93"><div align="center" class="style130"><strong>Grey Back Board </strong></div></td>
      <td width="26"><div align="center" class="style116">
          <input name="options3" type="CHECKBOX" value="33"/>
      </div></td>
      <td width="109"><div align="right" class="style126 style116">
          <div align="center"><strong>White Back Board </strong></div>
      </div></td>
      <td width="35"><div align="center" class="style126">
          <input name="options3" type="CHECKBOX" value="34"/>
      </div></td>
      <td width="97"><div align="right" class="style116 style126">
          <div align="center"><strong>Speciality Back Board </strong></div>
      </div></td>
      <td width="84"><div align="center" class="style126">
          <input name="options3" type="CHECKBOX" value="35"/>
      </div></td>
    </tr>
    <tr>
      <th width="98" height="44" scope="row"><div align="center" class="style125">Composite Cans</div></th>
      <th width="24" scope="row"><div align="center" class="style116">
          <input name="options3" type="CHECKBOX" value="36"/>
      </div></th>
      <td width="80"><div align="right" class="style126 style116">
          <div align="center"><strong>Multi Wallpaper Bag </strong></div>
      </div></td>
      <td width="29"><div align="center" class="style130">
          <input name="options3" type="CHECKBOX" value="37"/>
      </div></td>
      <td width="118"><div align="right" class="style126 style116">
          <div align="center"><strong>Paper Cups </strong></div>
      </div></td>
      <td width="31"><div align="center" class="style130">
          <input name="options3" type="CHECKBOX" value="38"/>
      </div></td>
      <td width="126"><span class="style116"><span class="style116 style126"></span>
            <div align="right" class="style126 style116">
              <div align="center"><strong>Cartons</strong></div>
            </div>
      </span></td>
      <td width="20"><div align="center" class="style130">
          <input name="options3" type="CHECKBOX" value="39"/>
      </div></td>
      <td width="93"><div align="center" class="style130"><strong>Labelstock </strong></div></td>
      <td width="26"><div align="center" class="style116">
          <input name="options3" type="CHECKBOX" value="40"/>
      </div></td>
      <td width="109"><div align="right" class="style126 style116">
          <div align="center"><strong>Plstic Label Printer </strong></div>
      </div></td>
      <td width="35"><div align="center" class="style126">
          <input name="options3" type="CHECKBOX" value="41"/>
      </div></td>
      <td width="97"><div align="right" class="style116 style126">
          <div align="center"><strong>Paper Label Printer </strong></div>
      </div></td>
      <td width="84"><div align="center" class="style126">
          <input name="options3" type="CHECKBOX" value="42"/>
      </div></td>
    </tr>
    <tr>
      <th width="98" height="44" scope="row"><div align="center" class="style125">Shrink label/Sleeves </div></th>
      <th width="24" scope="row"><div align="center" class="style116">
          <input name="options3" type="CHECKBOX" value="43"/>
      </div></th>
      <td width="80"><div align="right" class="style126 style116">
          <div align="center"><strong>Inks/Pigments </strong></div>
      </div></td>
      <td width="29"><div align="center" class="style130">
          <input name="options3" type="CHECKBOX" value="44"/>
      </div></td>
      <td width="118"><div align="right" class="style126 style116">
          <div align="center"><strong>Adhesives </strong></div>
      </div></td>
      <td width="31"><div align="center" class="style130">
          <input name="options3" type="CHECKBOX" value="45"/>
      </div></td>
      <td width="126"><span class="style116 style126"></span>
          <div align="right" class="style126 style116">
            <div align="center"><strong>Lacquers &amp; Coatings </strong></div>
          </div></td>
      <td width="20"><div align="center" class="style130">
          <input name="options3" type="CHECKBOX" value="46"/>
      </div></td>
      <td width="93"><div align="right" class="style126 style116">
          <div align="center"><strong>Prototyping</strong></div>
      </div></td>
      <td width="26"><div align="center" class="style130">
          <input name="options3" type="CHECKBOX" value="47"/>
      </div></td>
      <td width="109"><div align="right" class="style126 style116">
          <div align="center"><strong>Graphic Designing </strong></div>
      </div></td>
      <td width="35"><div align="center" class="style126">
          <input name="options3" type="CHECKBOX" value="48"/>
      </div></td>
      <td width="97"><div align="right" class="style116 style126">
          <div align="center"><strong>Testings</strong></div>
      </div></td>
      <td width="84"><div align="center" class="style126">
          <input name="options3" type="CHECKBOX" value="49"/>
      </div></td>
    </tr>
    <tr>
      <th width="98" height="44" scope="row"><div align="center" class="style125">Proofing/ Cylinder </div></th>
      <th width="24" scope="row"><div align="center" class="style116">
          <input name="options3" type="CHECKBOX" value="50"/>
      </div></th>
      <td width="80"><div align="right" class="style126 style116">
          <div align="center"><strong>Instruments Calibration Services </strong></div>
      </div></td>
      <td width="29"><div align="center" class="style130">
          <input name="options3" type="CHECKBOX" value="51"/>
      </div></td>
      <td width="118"><div align="right" class="style126 style116">
          <div align="center"><strong>Consultancy Services </strong></div>
      </div></td>
      <td width="31"><div align="center" class="style130">
          <input name="options3" type="CHECKBOX" value="52"/>
      </div></td>
      <td width="126"><div align="right" class="style126 style116">
          <div align="center"><strong>Package Testing Equipement</strong></div>
      </div></td>
      <td width="20"><div align="center" class="style130">
          <input name="options3" type="CHECKBOX" value="53"/>
      </div></td>
      <td width="93"><div align="center" class="style130"><strong>Package Converting Machines </strong></div></td>
      <td width="26"><div align="center" class="style116">
          <input name="options3" type="CHECKBOX" value="54"/>
      </div></td>
      <td width="109"><div align="right" class="style126 style116">
          <div align="center"><strong>Forming &amp; Filling Equipments </strong></div>
      </div></td>
      <td width="35"><div align="center" class="style126">
          <input name="options3" type="CHECKBOX" value="55"/>
      </div></td>
      <td width="97"><div align="right" class="style116 style126">
          <div align="center"><strong>Packaging Machines </strong></div>
      </div></td>
      <td width="84"><div align="center" class="style126">
          <input name="options3" type="CHECKBOX" value="56"/>
      </div></td>
    </tr>
    <tr>
      <th width="98" height="44" scope="row"><div align="center" class="style125">Barcoding Services </div></th>
      <th width="24" scope="row"><div align="center" class="style116">
          <input name="options3" type="CHECKBOX" value="57"/>
      </div></th>
      <td width="80"><div align="right" class="style126 style116">
          <div align="center"><strong>RFID</strong></div>
      </div></td>
      <td width="29"><div align="center" class="style130">
          <input name="options3" type="CHECKBOX" value="58"/>
      </div></td>
      <td width="118"><div align="right" class="style126 style116">
          <div align="center"><strong>Holograms</strong></div>
      </div></td>
      <td width="31"><div align="center" class="style130">
          <input name="options3" type="CHECKBOX" value="59"/>
      </div></td>
    </tr>
  </table>
  <br />

  <div align="center">
    <input name="Submit1" type="submit" value="submit" align="middle" style="width: 101px; height: 34px" />
    <br />
    &nbsp;</div>
</div>
</form>
<br />

<form name="formname" method="post" action="contact_insert.php" id="insert"><br />
<table width="998" height="61" border="1" cellpadding="0" cellspacing="0">
  <tr>
    <th width="989" height="57" bordercolor="#CCCCCC" bgcolor="#E9E9E9" class="style68" scope="col"> Are you a packaging service provider?  Be a part of the packfinder.in   &amp; reach&nbsp;  thousands of&nbsp; packaging&nbsp; consumers !!!  Register  your    company for FREE!!&nbsp; (Limited  subscriptions) </th>
  </tr>
</table>
 <div id="footer">
  <div align="center"><span class="style237"><a href="disclaimer.html">Disclaimer</a><span class="style118 style110"> |</span> <a href="partner with us.html">Partner with us<span class="style113">&nbsp;</span></a><span class="style113"><span class="style110">|</span>&nbsp;<a href="help &amp; Faq.html">Help &amp; Faq</a>&nbsp;<span class="style110">|</span>&nbsp;<a href="copy right.html">Copyright</a><span class="style110">&nbsp;|</span><a href="term&amp; condition.html">&nbsp;</a><a href="site map.html">Sitemap</a><a href="term&amp; condition.html">&nbsp;</a><span class="style110">|</span> <a href="term&amp; condition.html">Terms &amp; Conditions&nbsp;</a>&nbsp;<span class="style110">|</span><a href="privacy.html">&nbsp;Privacy policy</a> <span class="style111">&nbsp;|</span> <a href="advertise.html">Advertise</a></span></span></div>
</div>
<div id="footer1">
</body>
</html>**

Please let me know if someone could help me where i had mistaken.......
Awaited!!!!
Thanks in advance

Variable names can not contain spaces.

$fmcg application=mysql_real_escape_string($_POST['fmcg application']); 

Replace spaces with underscores ($fmcg application -> $fmcg_application)

In addition to that:

Spaces in column names are allowed in mysql but are bad practice in my opnion. The same goes for associative array keys. To avoid possible errors and ensure portability my recommendation is: use undersoces or camelCase instead of spaces for db column names, array keys and variable names.

yeah u r right spaces might be the problem..
thanx alot!!!
i;ll try with this....

OK. If it works (no more problems), please mark this as solved.

hi.i removed all the spaces but still not able to store it...
This time i'm getting error like:
Undefined index: user_id in D:\wamp\www\neha\contact_insert.php on line 15
Undefined index: user_id in D:\wamp\www\neha\contact_insert.php on line 16
.
.
.
.
Undefined index: user_id in D:\wamp\www\neha\contact_insert.php on line 71
wat should i do now...

This error is probably comming from this:

$user_id=mysql_real_escape_string($_POST['user_id']); 

If so, the $_POST array probably does not contain an element with the key user_id. The reeasons could be:

you either have not checked the user ID checkbox. Solution: check for existence of the element in post:

if(isset($_POST['user_id'])) {
    // if user ID exists, asign it to the variable
    $user_id=mysql_real_escape_string($_POST['user_id']);
} else {
    // otherwise do whatever is appropriate
    echo 'User ID is missing';
}

or the user ID checkbox might have other name than user_id. Chek the script that contains the form.

It is actually a good idea to check for existence of all the $_POST array elements before using them.

huh....its really troublesome for me now..I applied all the suggestions but still didnt got any solution..:(

u can c my html page accordingly i designed database...

In your code above there is no checkboc with the name user_id. In addition to that all the checkboxes have same name attribute (options3) which can not work. You have to give each checkbox unique name attribute (which should be equal to corresponding database field name).

Hi

can you check the below details in your code

Line 16 - $fmcg application there should not be any blank space
Line 121 - methode - should be method
Line 130 - Input Name ='Option 3' - replace Option3 by Categories name Like wise replace all checkbox name

hi...
i replaced them with categories name...but no changes..
i think the main problem is with php file..
every time execute html page it comes back to the same place ...So may b i'm lagging in connectivity or don't knw..

Hi

in line 121

<form name="forname" methode="post" action="#">

Replace the # as filename.php.

Just use the below code for test, copy the code name it as test.php

i just use one checkbox for test

<?php
if(isset($_POST['submit']))
{
    echo $test = $_POST['Granuels'];
}
?>

<form name="u" method="post" action="test.php" enctype="multipart/form-data">
<div ><span class="style115"><br />
    <span class="style129">Categories</span><br />
    <br />
  </span>
  <table width="1000" height="139" border="1" cellpadding="0" cellspacing="0" bordercolor="#EEEEEE">
    <tr>
      <th width="98" height="44" scope="row"><div align="center" class="style125">Granuels</div></th>
      <th width="24" scope="row"><div align="center" class="style116">
          <input name="Granuels" type="CHECKBOX" value="1"/>
      </div></th>
    </tr>
  </table>
  <input name="submit" type="submit" id="submit" value="submit">
  </div>

  </form>

Are you aware that you have 3 forms on your page?

1st form for login
2nd form for checkboxes
3rd (unclosed) form that does nothing

your second form

<form name="forname" methode="post" action="#">

first thing you should fix is method="post"

your action on this form action="#" says post back to current page

as someone pointed out you do not have an input of any kind with the name user_id which is why see undefined index notices

broj1 is wrong you CAN have inputs with the same name however when you do you need to use the sytanx name="samename[]" when this gets posted the next page php reads this as an array
so $samename = $_POST["samename"] $samename is now an array conataining the values in order of all your inputs named samename[]

checkboxes only get posted when they are checked
$_POST["unchecked_box"] will not be set in an array of checkboxes with the same name only the values of the checkboxes that were checked will be in the array

you will not have an array of (true, false, ...) you will only get true values

broj1 is wrong you CAN have inputs with the same name however when you do you need to use the sytanx name="samename[]

You can not have the same names for IDs. Using an array is not the same names since each element is separate. If you do not use an array the $_POST will contain only one entry.

sorry all but as i'm new to php i just can implement the changes you guys ask me do...but inspite of all implementations i'm still on the same lap...

Member Avatar for diafol

sorry all but as i'm new to php i just can implement the changes you guys ask me do...but inspite of all implementations i'm still on the same lap...

Posting 700 lines of code and markup is a bit much. There are so many issues here that you can't expect it to magically work with a few fixes. Seems to me you've got the table structure all wrong. You shouldn't have a column for each product. Each product should be a row in a products table.

i understand your view before i was having category table...but i have no. of user to register..its going to be a huge database so i defined each category as a column

I agree with what diafol said:

You shouldn't have a column for each product

You can have a product table with product ID and product name fields and a user table with user ID and other user data then a product_user table with product ID and user ID to store the orders (or whatever you wish to store). This would be a typical example of one to many relationship (one product has many users that bought it). It is easier to maintain, easier to extend/scale, easier to generate PHP code (just loop through products table) and is inline with requirements for database normalization.

Not sure if this exactly the essence of your app but I hope it helps. This link might be helpful:

http://www.deeptraining.com/litwin/dbdesign/FundamentalsOfRelationalDatabaseDesign.aspx

thanks broj1...now i'm going to close this topic as i'm not sure of any solution...Now i would either try to change DB schema or try to code it other way....
Thanx every one for ur time to give ans to my issue

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.