combo box in php

Page 1 of 1

1 Replies - 584 Views - Last Post: 14 November 2012 - 08:10 AM Rate Topic: -----

#1 jayy_two  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 36
  • Joined: 28-October 12

combo box in php

Posted 14 November 2012 - 08:08 AM

I'm trying to create a combo box that will have all the different manufacturers from the items table available for selection.
The manufacturers include: Dell,Hewlett Packard,Apple, Gateway, and American Network.

does the sql statement automatically import those names or do i physically declare them as option values?


 $sql = "SELECT * FROM items;";


$result = doSQL($sql);	

$combobox = '<select name="mfgName">';	
while(($row = mysql_fetch_assoc($result)))
//toDo
$combobox .= '<option value="' . $row['manufacturer'] . '">' . $row[''] . '</option>';	
$combobox .= '</select>';




Is This A Good Question/Topic? 0
  • +

Replies To: combo box in php

#2 no2pencil  Icon User is offline

  • Admiral Fancy Pants
  • member icon

Reputation: 5363
  • View blog
  • Posts: 27,325
  • Joined: 10-May 07

Re: combo box in php

Posted 14 November 2012 - 08:10 AM

Please do not open duplicate topics : original

** Closed **
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1