add options in select html tag(Drowdown) from database in wordpress
<label>Customer Name</label>
<select>
<?php
global $wpdb;
$result = $wpdb->get_results ( "SELECT * FROM wp_jaspreetsingh " );
foreach ( $result as $print )
{
echo"<option>$print->person_name</option>";
}
?>
</select>
Comments
Post a Comment