Ver Mensaje Individual
  #1 (permalink)  
Antiguo 26/02/2009, 09:47
diego007007
 
Fecha de Ingreso: enero-2009
Ubicación: en la casa
Mensajes: 223
Antigüedad: 15 años, 3 meses
Puntos: 3
Crear un sub menu

Hola amigos tengo el siguiente codigo:
Código PHP:
<?php
require('coneccion.php'); 
$part $HTTP_GET_VARS['part'];
if (
$part=="pel")
{
$sql 'SELECT * FROM tipusl';
$result mysql_query($sql);
echo 
'<table width = 100% cellspacing = 5pt cellpadding = 5pt valign = top align = center border = 1>
      <tr>
          <th>
         <p style = "font-size:16pt; text-weight : bold">Numero</p>
        </th>
        <th>
         <p style = "font-size:14pt; text-weight : bold">Nombre</p>
        </th>
        <th>
         <p style = "font-size:16pt; text-weight : bold"><a href = "index1.php?idu=0&part=pel2">Mostrar todas las peliculas</a></p>
        </th>'
;

$i=1;
while(
$row=mysql_fetch_array($result)) 
{
echo 
"<tr>
       <td width = 10%>
        <p style = 'font-size:14pt;'>$i</p>
       </td>
       <td>
        <p style = 'font-size:14pt;'>$row[1]</p>
       </td>
       <td>
        <p style = 'font-size:12pt;'><a href = 'index1.php?part=pel2&idu=$row[0]'>Mostrar peliculas</a></p>
       </td>
       </tr>"
;
$i++;
};
echo 
'</table>';
}
if (
$part=="pel2")
{
$idu $HTTP_GET_VARS['idu'];
if (
$idu==0)
{
$sql 'SELECT uslugi.idu, tipusl.tip, uslugi.uslug, uslugi.price FROM uslugi, tipusl WHERE tipusl.idtu = uslugi.idtu LIMIT 0,100';
$result mysql_query($sql);
echo 
'<table width = 100% cellspacing = 5pt cellpadding = 5pt valign = top align = center border = 1>
      <tr>
       <th>
        <p style = "font-size:16pt; text-weight : bold">Numero</p>
       </th>
       <th>
        <p style = "font-size:14pt; text-weight : bold">Tipo de pelicula</p>
       </th>
       <th>
        <p style = "font-size:14pt; text-weight : bold">Nombre de la pelicula</p>
       </th>
       <th>
        <p style = "font-size:16pt; text-weight : bold">Costo</p>
       </th>
      </tr>'
;
$i=1;
while(
$row=mysql_fetch_array($result)) 
{
echo 
"<tr>
       <td width = 10%>
        <p style = 'font-size:14pt;'>$i</p>
       </td>
       <td>
        <p style = 'font-size:14pt;'>$row[1]</p>
       </td>
       <td>
        <p style = 'font-size:14pt;'>$row[2]</p>
       </td>
       <td>
        <p style = 'font-size:14pt;'>$row[3]</p>
       </td>
       <td>
        <p style = 'font-size:12pt;'><a href = 'agregar.php?part=start&idu=$row[0]'>Comprar</a></p>
       </td>
       </tr>"
;
$i++;
};
echo 
'</table>';
}
else
{
$sql 'SELECT uslugi.idu, uslugi.uslug, uslugi.price FROM uslugi WHERE uslugi.idtu = '.$idu.' LIMIT 0,100';
$result mysql_query($sql);
echo 
"<p><a href = 'index1.php?part=pel' style = 'color:red' title = 'Regresar a ver peliculas'>Regresar a tipo de peliculas</a>
      <br><br>"
;
echo 
'<table width = 100% cellspacing = 5pt cellpadding = 5pt valign = top align = center border = 1>
      <tr>
       <th>
        <p style = "font-size:16pt; text-weight : bold">numero</p>
       </th>
       <th>
       <p style = "font-size:14pt; text-weight : bold">Tipo de pelicula</p>
       </th>
       <th>
       <p style = "font-size:16pt; text-weight : bold">Costo</p>
       </th>
      </tr>'
;
$i=1;
while(
$row=mysql_fetch_array($result)) 
{
echo 
"<tr>
       <td width = 10%><p style = 'font-size:14pt;'>$i</p>
       </td>
       <td>
        <p style = 'font-size:14pt;'>$row[1]</p></td><td><p style = 'font-size:14pt;'>$row[2]</p>
       </td>
       <td>
        <p style = 'font-size:12pt;'><a href = 'agregar.php?part=start&idu=$row[0]'>Comprar</a></p>
       </td>
      </tr>"
;
$i++;
};
echo 
'</table>';
}
}
?>
Que lo que hace es mostrar la informacion de una tabla con diferentes opciones de seleccion y crea el enlace a la siguiente tabla dependiendo de cada categoria
El codigo trabaja bien, pero lo que quiero hacer es que en lugar que me muestre las tablas por separado como hace (primero muestra la tabla principal, despues muestra las tablas siguientes) necesito que muestre un menu como en este ejemplo es de deliculas:

Tipo de peliculas:
- Accion
- Drama
- Comedia

Y al dar click en accion tendria que mostrar

Tipo de peliculas:
- Accion
*Antiguas
*Nuevas
- Drama
- Comedia

y asi en esa forma, gracias por su ayuda, si necesitan la base de datos o cualquier informacion me dicen nomas