Ver Mensaje Individual
  #1 (permalink)  
Antiguo 11/05/2012, 09:10
onRush
 
Fecha de Ingreso: abril-2012
Ubicación: Trelew
Mensajes: 14
Antigüedad: 12 años
Puntos: 2
Escapear link en tabla + GET

Hola gente teniendo en cuenta esta sintaxis de template:

<? // Comandos PHP
?>
<table><tr>
<td><a href="<? echo $posible_url; ?>">Link</a></td>
</tr>
</table><? // Otras cosas ?>


Quiero hacer lo siguiente (que no es asi xq no me sale) probé estas 2 opciones:

Código PHP:
Ver original
  1. <td><a href="<?php echo "sinopsis.php?id_peli=".$fila['id'];?>"> <?php echo $fila['titulo'] ?> </a></td>
  2.  
  3. <td><a href="sinopsis.php?id_peli=\"<?php $fila['id'];?>\"> <?php echo $fila['titulo'] ?> </a></td>


Es decir, en la tabla se va ver el link de una determina pelicula ($fila['titulo']), pero además quiero que al hacer click en este link me lleve a la página de sinopsis de esa película mediante su id (ya que puede haber más películas con el mismo titulo).

Desde ya gracias. Les dejo el bloque de código completo (lo que esta comentado es lo que quiero hacer y no me sale):


Código PHP:
Ver original
  1. <table border ="1">
  2.      <tr>
  3.      <th>Titulo</th><th>Duracion</th><th>Estado</th>
  4.      </tr>
  5.      <?php
  6.          foreach($results as $fila): ?>
  7.       <tr>
  8.        <!--   <td><a href="<?php echo "sinopsis.php?id_peli=".$fila['id'];?>"> <?php echo $fila['titulo'] ?> </a></td> !-->
  9.        <!--    <td><a href="sinopsis.php?id_peli=\"<?php $fila['id'];?>\"> <?php echo $fila['titulo'] ?> </a></td> !-->
  10.    
  11.            <td> <?php echo $fila['duracion'] ?> </td>
  12.                <td> <?php echo $fila['estado'] ?> </td>
  13.      </tr>
  14.   <?php endforeach; ?>
  15. </table>