You are here: Re: Query Question « PHP SQL « IT news, forums, messages
Re: Query Question

Posted by thehuby on 09/29/05 17:28

Something like this should suffice - assuming you are using MySQL
anyway.

HTH

Rick
www.e-connected.com

$conn = mysql_connect( "localhost", "<USERNAME>", "<PASSWORD>" );
mysql_select_db ( "dogs", $conn );

$sql = "SELECT * FROM dogs_tbl";
$rs = mysql_query( $sql, $connection );

$html = "<select name='dogname'>";
while($row = mysql_fetch_row($rs)) {
$dogname = $row['dogname']; //this assumes that the column name is
'dogname'
$html .= "<option value='" .$dogname. "'>" .$dogname. "</option>";
}

$html .= "</select>";

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация