Ciao, ho un problema e continuo a sbatterci al testa senza riuscire a risolverlo,
Sto sviluppando un plugin per joomla e ho un form con una select dinamica e 2 selezioni date. Il problema è che la select non scorre l'array.. Anche se nella tendina vedo tutti i record e posso selezionarli poi se vado a vedere il dato reale contenuto nell'array è sempre lo stesso, cioè l'ultimo record di tutto l'array...
MI potete aiutare? Grazie in anticipo .... Viposto il codice
Codice PHP:
<?
$nome_selected 
JRequest::getInt('operatore''''post');
$db =& JFactory::getDBO();
 
$query "SELECT DISTINCT (operatore)FROM #__storico_attivita";

$db->setQuery($query);
$nomes $db->loadAssocList();
$nome_options "";
foreach ( 
$nomes as $v ) {
 if ( 
$nome_selected == $v['operatore'] ) {
 
$selected "selected='selected'";
 } else {
 
$selected '';
 }
 
$nome_options .= "<option value='".$v['operatore']."' $selected >".$v['operatore']."</option>";
}    

<
form name="form" action="index.php?option=com_timecard&task=showTimecard" method="post">
 <
label style="width:150px;">Scegli l'operatore:</label>
<select name="operatore">
<option>SELEZIONA</option>
<?php echo $nome_options;?>
<select>



<label>Scegli il periodo:</label>
                 
<label>[b]DAL :[/b]</label> <input type="text" name="dalgiorno" id="dalgiorno" />
 <input type="reset" class="button" value="..." onclick="return showCalendar('
dalgiorno', '%Y-%m-%d');" />

             
<label>[b] AL :[/b]</label>   <input type="text" name="algiorno" id="algiorno" />
                 
 <input type="reset" class="button" value=".." onclick="return showCalendar('
algiorno', '%Y-%m-%d');" /> 
<input type="submit" class="button" name="periodo" value="VISUALIZZA" />

<input type="hidden" name="user" value="dalgiorno" />
<input type="hidden" name="operatore" value="<?php echo $v['
operatore']; ?>" />
<input type="hidden" name="option" value="<?php echo $option?>" />
 </p>
       </form>