hi is there a way with the code i have posted to only show a cretain amount of records in a dropdown list. i am not talking about the LIMIT 0,5 in mysql. i have 1000,s of records and it is causing IE to hang. firefox is quick. if someone could give me some guidance i would be grateful. thanks.
<p><fieldset><legend class="style8">Select a Box</legend>
<select name="suggestTextField1" id="suggestTextField1">
<option value="">Select a Box</option>
<?php
do {
?>
<option value="<?php echo $row_rsSuggest1['boxref']?>"><?php echo $row_rsSuggest1['boxref']?></option>
<?php
} while ($row_rsSuggest1 = mysql_fetch_assoc($rsSuggest1));
$rows = mysql_num_rows($rsSuggest1);
if($rows > 0) {
mysql_data_seek($rsSuggest1, 0);
$row_rsSuggest1 = mysql_fetch_assoc($rsSuggest1);
}
?>
</select>
</fieldset>
</p>
$colname_rsSuggest1 = "-1";
if (isset($_SESSION['kt_idcode_usr'])) {
$colname_rsSuggest1 = (get_magic_quotes_gpc()) ? $_SESSION['kt_idcode_usr'] : addslashes($_SESSION['kt_idcode_usr']);
}
mysql_select_db($database_conn, $conn);
$query_rsSuggest1 = sprintf("SELECT DISTINCT `boxref` FROM `files` WHERE customer = '%s' AND boxstatus = 1 ORDER BY boxref ASC", $colname_rsSuggest1);
$rsSuggest1 = mysql_query($query_rsSuggest1, $conn) or die(mysql_error());
$row_rsSuggest1 = mysql_fetch_assoc($rsSuggest1);
$totalRows_rsSuggest1 = mysql_num_rows($rsSuggest1);