Hi all,
I've got a drop-down field which gets populated from data of a MSQL table.
The problem is that the list is over 12,000 records big, so the drop-down takes
really long to load.
Would it be faster if I based the drop-down from a XML file that is located in
the same directory where the php (with the drop-down code) is located?
If so - could someone help with code to populate the drop-down please?
I'm very new to Web development and learn most things from Google
This is the stripped-out code I'm using at the moment:
The PHP part:
<?php
$ProvincesLU = mysqli_query($mysqli, "SELECT * FROM LookupList WHERE Province <> ''");
while($Row = mysqli_fetch_array($ProvincesLU)) { $ProvinceOptions = $ProvinceOptions."<option>$Row[1]</option>"; }
?>
The HTML part:
<html>
<head>
<title>Contact Details</title>
</head>
<body>
<form name="form1" method="post" action="">
<tr>
<td>Province</td>
<td>
<select disabled name="SProvince" <?php echo $SProvince;?>>
<option value='<?php echo $SProvince;?>'><selected="selected"><?php echo $SProvince;?></option>
<?php echo $ProvinceOptions;?>
</select>
</td>
</tr>
</body>
</html>
I've got a drop-down field which gets populated from data of a MSQL table.
The problem is that the list is over 12,000 records big, so the drop-down takes
really long to load.
Would it be faster if I based the drop-down from a XML file that is located in
the same directory where the php (with the drop-down code) is located?
If so - could someone help with code to populate the drop-down please?
I'm very new to Web development and learn most things from Google

This is the stripped-out code I'm using at the moment:
The PHP part:
<?php
$ProvincesLU = mysqli_query($mysqli, "SELECT * FROM LookupList WHERE Province <> ''");
while($Row = mysqli_fetch_array($ProvincesLU)) { $ProvinceOptions = $ProvinceOptions."<option>$Row[1]</option>"; }
?>
The HTML part:
<html>
<head>
<title>Contact Details</title>
</head>
<body>
<form name="form1" method="post" action="">
<tr>
<td>Province</td>
<td>
<select disabled name="SProvince" <?php echo $SProvince;?>>
<option value='<?php echo $SProvince;?>'><selected="selected"><?php echo $SProvince;?></option>
<?php echo $ProvinceOptions;?>
</select>
</td>
</tr>
</body>
</html>