[thelist] mysql_query + php

Andrew Maynes andrew at humanbehaviour.co.uk
Tue Feb 25 02:57:01 CST 2003

can anone say why this doesn't work?  When I say work I mean pull in the records
from city and display them?



echo "<select name=\"CityID\" size=\"1\" class='menuForm'>";

$result=mysql_query("$DBName","SELECT City, CityID FROM city ORDER BY City");
while ($row = mysql_fetch_array($result)) {
echo "<option value=\"$row[1]\"> $row[0] </option>";
echo "</select>";



More information about the thelist mailing list