Ver Mensaje Individual
  #7 (permalink)  
Antiguo 28/10/2009, 09:22
Avatar de elsolodigno
elsolodigno
 
Fecha de Ingreso: agosto-2009
Mensajes: 225
Antigüedad: 14 años, 9 meses
Puntos: 2
Respuesta: Problema con select en html y php

Hola, capaz que el problema es el form, te paso el form completo a ver si me podés guiar:

<form method="post" action="<?=$_SERVER['PHP_SELF'];?>" enctype="multipart/form-data" name="phmailer" onsubmit="return Checkit(this);">
<table align="center" class="table">
<tr>
<td colspan="2" class="table_header" width="100%"><?=$websitename;?></td>
</tr>
<?If($allowattach > 0) {?>
<tr>
<td width="100%" class="attach_info" colspan="2">
<b>"Podés subir hasta 5 fotos simultáneamente. Si son muchas es conveniente que envíes un archivo .ZIP"</b><br /><br />

<b>Tipos de archivos válidos:</b> <?=$types?><br />
<b>Máximo por archivo:</b> <?=$max_file_size?>kb.<br />
<b>Máximo combinado:</b> <?=$max_file_total?>kb.

</td>
</tr>
<?}?>


<td>


<select name="nombre" size="1">

<option value="valor1">Texto1</option>

<option value="valor2" selected>Texto2</option>

<option value="valor3">Texto3</option>

<option value="valor4">Texto4</option>

</select>

</td>

<? $nombre = $_POST['nombre'];?>



<?
$igual = $username;

$sql2 = mysql_query("SELECT * FROM maaking_users where username = '$igual'");

while($row = mysql_fetch_array($sql2)){

$username = $row['username'];
$email = $row['email'];
$fullname = $row['fullname'];
$site = $row['site'];
$city = $row['city'];
$country = $row['country'];
$tel = $row['tel'];
$profile = $row['profile'];
}

?>

<input name="yourname" type="hidden" size="30" value="<?=stripslashes(htmlspecialchars($username) );?>" />

<input name="youremail" type="hidden" size="30" value="<?=stripslashes(htmlspecialchars($email));? >" />

<?If($use_subject_drop AND is_array($subjects)) {?>
<select name="emailsubject" size="1">

<?while(list($key,$val)=each($subjects)) {?>

<option value="<?=intval($key);?>"><?=htmlspecialchars(str ipslashes($val));?></option>

<?}?>
</select>


<?} Else {?>

<?$emailsubject = 'Nuevas fotos';?>

<input name="emailsubject" type="hidden" size="30" value="<?=stripslashes(htmlspecialchars($emailsubj ect));?>" />

<?}?>
</td>
</tr>

<?For($i=1;$i <= $allowattach; $i++) {?>
<tr>
<td width="30%" class="table_body">Adjuntar archivo:</td>
<td width="70%" class="table_body"><input name="attachment[]" type="file" size="30" /></td>


</tr>




<?}?>


<textarea name="yourmessage" style="display:none;">
<?
echo " Nombre completo: " . stripslashes(htmlspecialchars($fullname)) . "\n" ;
echo " Dirección: " . stripslashes(htmlspecialchars($site)) . "\n" ;
echo " Ciudad: " . stripslashes(htmlspecialchars($city)) . "\n" ;
echo " Provincia: " . stripslashes(htmlspecialchars($country)) . "\n" ;
echo " Tel/Celular: " . stripslashes(htmlspecialchars($tel)) . "\n" ;
echo " Otros datos de interés: " . stripslashes(htmlspecialchars($profile)) . "\n";
echo " Nombre: " . stripslashes(htmlspecialchars($nombre)) . "\n" ;




?></textarea>

<tr>
<td colspan="2" width="100%" class="table_footer">
<input type="hidden" name="submit" value="true" />
<input type="submit" value="<?=$submitvalue;?>" /> &nbsp;
<input type="reset" value="<?=$resetvalue;?>" />
</td>
</tr>
</table>
</form>


Muchas gracias!.