Ver Mensaje Individual
  #3 (permalink)  
Antiguo 18/05/2012, 11:07
Avatar de standby82
standby82
 
Fecha de Ingreso: abril-2011
Mensajes: 29
Antigüedad: 13 años
Puntos: 0
Respuesta: Pagina anterior con formulario

no, no utilizo variables de sesion

funcion de menu

Código PHP:
function menu($categoria, )
{
$categoria= $_POST['categoria'];


?>
<form name="menu" enctype="multipart/form-data" method="post" action="anuncios.php"  >
<table width="1152" height="240" border="0"cellpadding="0" cellspacing="0">
  <tr>
    <td height="240" bgcolor="#3a6ea5"><table width="1085" height="165" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td width="844"><table width="816" height="165" border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td width="204" bgcolor="#33CCFF"><table width="200" border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td>&nbsp;</td>
                </tr>
                <tr>
                  <td align="left"><strong>&nbsp;&nbsp;Lo que buscas </strong></td>
                </tr>
                <tr>
                  <td>&nbsp;</td>
                </tr>
              </table></td>
              <td width="298" bgcolor="#33CCFF"><table width="238" border="0">
                <tr>
                  <td><div align="center">Categoria </div></td>
                </tr>
                <tr>
                  <td><?php crear_select($categoria);?> </td>
                </tr>
              </table></td>
              <td width="246" bgcolor="#33CCFF"><table width="200" border="0">
                <tr>
                  <td>Descripcion</td>
                </tr>
                <tr>
                  <td>&nbsp;</td>
                </tr>
              </table></td>
              <td width="68" bgcolor="#33CCFF">&nbsp;</td>
            </tr>
            <tr>
              <td bgcolor="#66FFFF"><table width="200" border="0">
                <tr>
                  <td>&nbsp;</td>
                </tr>
                <tr>
                  <td align="left">&nbsp;</td>
                </tr>
                <tr>
                  <td>&nbsp;</td>
                </tr>
              </table></td>
              <td bgcolor="#66FFFF">&nbsp;</td>
              <td bgcolor="#66FFFF">&nbsp;</td>
              <td bgcolor="#66FFFF">&nbsp;</td>
            </tr>
          </table>
          </td>
        <td width="312"><table width="203" border="0">
          <tr>
            <td width="188" align="left">&nbsp;</td>
          </tr>
          <tr>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td height="26" align="center"> <input type=submit value="Buscar" >&nbsp;</td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
</table>
</form> 
<?php
}
funcion obtener Libros
Código PHP:
function obtener_libros($categoria



  if (!(
$conn db_connect()))
  {
  echo 
"  No conectado   ";
    return 
false;
    }
 
$result mysql_query"select * from libros where categoria = '$categoria'");
     
  if (!
$result)
    {
    return 
false;
    }
global 
$global_result;
$global_result=$result;
return 
global_result;    

}; 
formato_resultados($global_result);
Código PHP:
function formato_resultados($global_result)
{
while ($row=mysql_fetch_array($global_result)) 
    { //Bucle para ver todos los registros
      $titulo=$row['Titulo']; //datos del campo nombre
      $cambiox=$row['autor']; //datos del campo teléfono
      $ciudad=$row['genero']; //datos del campo email
     // echo "$titulo, $autor, $genero. <br/>"; //visualizar datos
     


    
    ?>  
<style>
.c1 {background-color:white; color:black; border:1px solid #F5F5F5 }
.c2 {background-color:Ghostwhite; color: black; border:1px solid #F5F5F5; cursor: pointer}
.c3 {color: blue; font-size:14px; font-weight:bold; font-family:Arial, Helvetica, sans-serif}
.c4 {color: black; font-size:12px; font-family:Arial, Helvetica, sans-serif}
.c5 {border:1px solid #F5F5F5 }
</style>
    

<table onMouseOver="this.className='c2'" onMouseOut="this.className='c1'" table width="900" align="center"  cellspacing="1" class='c5' cellpadding="0" onClick="document.location.href='index.html'">
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
    <td class ="c3" width="232" height="84" ><?php echo "&nbsp&nbsp".trim($titulo);?></td>
    <td class ="c4" width="529" ><?php echo $autor;?> <div align="left"></div></td>
    <td width="135" ><?php echo $genero;?><div align="right"></div></td>
</tr>

</table>
</tr>
</table>


<?php        
      
      
      
// fin del Wili


// fin de funcion
espero que os sirva