Hello All programers here. Hopefully someone can help me I am using the free sms script as posted in another thread. I have added more providers to the database which has cause the display to mess up on the index. What I am wanting to do is switch it from radio buttons to a dropdown menu. Here's the code for the buttons function get_providers(){ echo"<table width='100%'><tr><td width=200' align='left'>"; $p = 0; $query = mysql_query("SELECT * FROM `providers` ORDER BY `name` DESC"); while($fetch = mysql_fetch_array($query)){ $p++; // Limit 3 per row if($p % 7 == 0){ $new_line = "</td><td width='200' align='left'>"; }else{ $new_line = ""; } echo"<input type='radio' value='$fetch[address]' class='radiok' name='prov'> $fetch[name]<br />$new_line"; } echo"</td></tr></table>"; } Code (markup):
function get_providers(){ echo"<table width='100%'><tr><td width=200' align='left'>"; echo "<select name=\"prov\">"; $query = mysql_query("SELECT * FROM `providers` ORDER BY `name` DESC"); while($fetch = mysql_fetch_array($query)){ echo"<option value='$fetch[address]'> $fetch[name]</option>\r\n"; } echo "</select>"; echo"</td></tr></table>"; } Code (markup):
I bet you to it and came to post the code I worked out and saw someone had replied. Thanks for your response. I think your code is the same as mine function get_providers(){ echo"<table width='100%'><tr><td width=200' align='left'>"; echo"<select name='prov' >"; $p = 0; $query = mysql_query("SELECT * FROM `providers` ORDER BY `name` ASC"); while($fetch = mysql_fetch_array($query)){ echo"<option value='$fetch[address]'> $fetch[name]</option>"; } echo"</select>"; echo"</td></tr></table>"; } Code (markup):