
02/06/2010, 10:19
|
| | Fecha de Ingreso: mayo-2010
Mensajes: 112
Antigüedad: 14 años, 10 meses Puntos: 0 | |
Respuesta: POST con texto y combobox eso es de facil solucion:
<form action="newhome_search.php" method="post">
<table width="100%%" border="1">
<tr>
<td width="39%"><p>
Titol
<input type="text" name="textfield_titol" />
</p>
<p><?php $link=mysql_connect('localhost','sdsdsd','ffdfdf')
or die('Could not connect: '.mysql_error());
// echo 'Connected successfully';
if (!mysql_select_db('ss', $link)) {
echo 'Could not select database';
exit;
}
$sql="select nom from coleccions";
$result = mysql_query($sql,$link) or die(mysql_error());?>Coleccio
<select name="coleccio_select">
<option value="0"></option>
<?php $contador_while=1;
while ($row=mysql_fetch_array($result))
{ ?>
<option value="<?php echo $contador_while ?>"><?php echo $row['nom']?></option>
<?php $contador_while++;
} ?>
</select>
<?php mysql_close($link); ?>
</p></td>
<td width="61%"><p>
Autor
<?php $link=mysql_connect('localhost','XXXXXXXXt','fsfsd fd')
or die('Could not connect: '.mysql_error());
// echo 'Connected successfully';
if (!mysql_select_db('ss', $link)) {
echo 'Could not select database';
exit;
}
$sql="select nom from autors";
$result = mysql_query($sql,$link) or die(mysql_error());
$contador_while=1; ?>
<select name="autor_select">
<option value="0"></option>
<?php while ($row=mysql_fetch_array($result))
{ ?>
<option value="<?php echo $contador_while ?>"><?php echo $row['nom']?></option>
<?php $contador_while++;
} ?>
</select>
</p>
<p> </p></td>
</tr>
</table>
<p>
<input type="submit" name="Submit2" value="Buscar" />
</p>
</form> |