Ben bir db alanlardan bir seçim listesini doldurmak için aşağıdaki kodu kullanıyorum ve o inşaat büyük, sorun nasıl yapışkan yapabilirim nedir? Eğer kullanıcı yanlış bilgi sayfayı yeniden türleri ve bu listeden seçilen ne hatırlamıyor.
Ben ifadeleri eğer birkaç farklı denedim ama o çalışma alamadım. Liste 15 müşteri adları ile doldurur, ne bu mücadele için en iyi yol olacağını? Teşekkürler
<fieldset>
<legend><b>Check to see how many times a user has logged in</b></legend>
<p><label for="fname">First Name:</label><input type="text" id="fname" name="fname" value="<?php if (!empty($fname)) echo $fname; ?>" /></p>
<p><label for="lname">Last Name:</label><input type="text" id="lname" name="lname" value="<?php if (!empty($lname)) echo $lname; ?>" /></p>
<p><label for="customer">Customers:</label>
<select name="customer">
<?php
$custNames = getCustomers();
foreach($custNames as $customers){
echo '<option value="' . $customers . '">' . $customers . '</option>';
}
?>
</select>
</p>
<p class="submit"><input type="submit" value="See Logins" name="submit" /></p>
</fieldset>