A Heart in Love with Beauty Never Grows Old...!




News Update :

Mysql column value in select option

Below is an example of php code to use mysql column value in select option dropdown...

<?php
  $con = mysql_connect("localhost","root","password");
  $db = mysql_select_db("database",$con);
  $get=mysql_query("SELECT id, url, name FROM table");
  ?>
 <html>
     <head>
     <style type="text/css">
html, body {
background: #97C8FF 
}
body {
margin: 0 0 0 0 ;
}
#right {
width:150px;
float: left;
}
</style>
     </head>
 <body>
    <form>
        <select onChange="window.open(this.options[this.selectedIndex].value,'frameid')"  onclick="Size(this,4);" class="select" style="width:150px;"> 
         <?php
             while($row = mysql_fetch_assoc($get)){?>
                <option value = "<?php echo($row['url'])?>" ><?php echo($row['name'])?></option>
                <?php } ?>
        </select>
    </form>
    </body>
 </html>
.

Comments:

No comments :

You are the essence of essence....
Be sure of what you look for...!
It is you... It is in you...!

Online Radio...!