What am I doing wrong - PHP
| From: | Stuart Felenstein | Date: | Fri, 12 Nov 2004 20:53:52 +0000 |
| Subject: | What am I doing wrong - PHP | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-201868@lists.php.net to get a copy of this message | ||
Ok, hopefully I can explain this clearly, even though
I think I might be an idiot since Ive been going on
about this for a few days.
I have a table that holds values and labels
i.e. 1 = New York
2 = Boston
3 = Kansas City
4 = Amsterdam
I want to put this table into a multiple selection
list, that a user can choose from in a form
My code is drawing a blank though:
//This is my call to the table "staindtypes"
<?php
mysql_select_db($database_lokale, $lokale);
$indque1 = "SELECT * FROM staindtypes";
$inds = mysql_query($indque1, $lokale) or
die(mysql_error());
$row_inds = mysql_fetch_assoc($inds);
$totalRows_inds = mysql_num_rows($inds);
$row = mysql_fetch_row;
?>
//Here is the element and the php to loop it
<form name="form1" id="form1" method="post" action="">
<select name="Ind" size="5" multiple="multiple"
id="Ind">
<option value="">Please Select</option>
<?php
do {
?>
<option value="<?php echo
$rows['CareerIDs']?>"><?php echo
$row_$result['CareerCategories']?></option>
<?php
} while ($rows = mysql_fetch_assoc($inds));
$rows = mysql_num_rows($inds);
if($rows > 0) {
mysql_data_seek($inds, 0);
$rows = mysql_fetch_assoc($inds);
}
?>
When I load the page it is blank.
Any help would be appreciated.
Stuart