Ciao a tutti!
Ho creato questo script per slezionare una casella select "giusta" dopo un interrogazione da db:
//Function to get the correct status of the order
if ($status == "Open") {
$stat[0] = 'selected="selected"';}
elseif
($status == "Closed") {
$stat[1] = 'selected="selected"';}
elseif
($status == "Hold") {
$stat[2] = 'selected="selected"';}
elseif
($status == "Delete") {
$stat[3] = 'selected="selected"';};
Lo scipt funziona ma sono quasi sicuro che esite una maniera piu' raffinata per farlo.
QUalche agghiutttto? O coniglio?![]()