ejemplo:
Entidad= Sistemas
Buscar= software
Resultado
Nod32, 19/11/2008, Software que sirve para eliminar los virus de la pc...
Código PHP:
<form name="m" method="post" action="" id="respuesta">
<table width="540" align="center" cellpadding="0" cellspacing="0" border="0">
<tr>
<td colspan="2" width="540">
Entidad:
<?php
include("conexion.php");
$select1 = "SELECT distinct entidad FROM jurisprudencia";
$resul = mysql_query($select1) or die(mysql_error());;
echo "<select name='entidad' style='width:440px;'>";
echo "<option value=\"0\" selected=selected>Entidades</option>";
while($sql = mysql_fetch_array($resul)) {
echo "<option value=\"".$sql['entidad']."\">".$sql['entidad']."</option>";
}
echo "</select>"
?>
</td>
</tr>
<tr><td height="15"></td></tr>
<tr>
<td>
Tema:
<?php
$select2 = "SELECT * FROM jurisprudencia";
$resul = mysql_query($select2) or die(mysql_error());;
echo "<select name='tema' style='width:190px;'>";
echo "<option value=\"0\" selected=selected>Tema</option>";
while($sql = mysql_fetch_array($resul)) {
echo "<option value=\"".$sql['tema']."\">".$sql['tema']."</option>";
}
echo "</select>"
?>
</td>
<td>
Año:
<?php
$select3 = "SELECT distinct annio FROM jurisprudencia order by annio desc";
$resul = mysql_query($select3) or die(mysql_error());;
echo "<select name='annio' style='width:50px;'>";
echo "<option value=\"0\" selected=selected>Año</option>";
while($sql = mysql_fetch_array($resul)) {
echo "<option value=\"".$sql['annio']."\">".$sql['annio']."</option>";
}
echo "</select>"
?>
</td>
</tr>
<tr><td height="10"></td></tr>
<tr>
<td valign="top" colspan="2">Texto: <input name="buscar" type="text" size="30" value=""></td>
</tr>
<tr><td height="10"></td></tr>
<tr>
<td><input type="button" value="Buscar" onClick="validar()" name="button" id="respuesta"></td></tr>
</table>
</FORM>