How to add category and subcategory in shoppingcart
<pre><code>&lt;h2&gt;Add Product&lt;/h2&gt;
&lt;?php
$sql="select * from category where parent_id=0 ";
                $res=mysql_query($sql);
echo "&lt;FORM METHOD=POST ACTION=''  enctype='multipart/form-data'&gt;
&lt;TABLE&gt;
&lt;TR&gt;
&lt;TD&gt;Product   Category&lt;/TD&gt;
&lt;TD&gt;&lt;SELECT  NAME='sel'&gt;
&lt;OPTION VALUE='' SELECTED&gt;SELECTED&lt;/OPTION&gt; ";  
                     while($row=mysql_fetch_array($res))
                     {
                    echo "&lt;OPTION VALUE='$row[cid]' &gt;$row[cname]&lt;/OPTION&gt;";
                                                $sql1="select * from category where parent_id= $row[cid]";
                                                $res1=mysql_query($sql1);
                                                while($row1=mysql_fetch_array($res1))
                                                    {
                                                      echo"&lt;OPTION VALUE='$row1[cid]' &gt;--$row1[cname]&lt;/OPTION&gt;";
                                                      }
                                            }
</code></pre>

<p>Can any one suggest if there is something wrong?
I am adding the category and sub category but its not showng the sub category under the category.</p>
