rahul_29 0 Newbie Poster
<?php

mysql_select_db("store");

$t="SELECT COLUMN_TYPE
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME =  'stoke'
AND COLUMN_NAME =  'catogory'";
$q=mysql_query($t);

while($r=mysql_fetch_array($q)) { 

$y=$r['COLUMN_TYPE'];
$u=explode("','",substr($y,6,-2));
//print_r($u); ?>
                    <select name="category"  >
                    <option value="">Select Category:</option>
                        <?php
foreach($u as $option) {
               print("<option>$option</option> ");

            } ?>
            </select>
            <?php

        }
?>