Ver Mensaje Individual
  #3 (permalink)  
Antiguo 20/08/2008, 11:00
Avatar de Triby
Triby
Mod on free time
 
Fecha de Ingreso: agosto-2008
Ubicación: $MX->Gto['León'];
Mensajes: 10.106
Antigüedad: 15 años, 8 meses
Puntos: 2237
Respuesta: mantener seleccion combobox

Código PHP:
$selected_id $_POST['domain_id']; // Para realizar la comparación
while($value mysql_fetch_array($result))
{
$domain_id=$value['domain_id'];
$keep = (R4crypt($domain_id) == R4crypt($selected_id)) ? ' selected="selected" ' '';
$domain_description=substr($value['domain_description'],0,70);
$option_line=$option_line.'<option value="'.R4crypt($domain_id).'"$keep>'.$domain_descript ion.'</option>'."\n";

if (
$domain_id==$_POST['domain_id'])
$option_line=$option_line.'<option selected value="'.R4crypt($domain_id).'">'.$domain_descript ion.'</option>'."\n"
Del require_once no pusiste el error, así que no sé.