<? // 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
<td><a href="<?php echo "sinopsis.php?id_peli=".$fila['id'];?>"> <?php echo $fila['titulo'] ?> </a></td> <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
<table border ="1"> <tr> <th>Titulo</th><th>Duracion</th><th>Estado</th> </tr> <?php foreach($results as $fila): ?> <tr> <!-- <td><a href="<?php echo "sinopsis.php?id_peli=".$fila['id'];?>"> <?php echo $fila['titulo'] ?> </a></td> !--> <!-- <td><a href="sinopsis.php?id_peli=\"<?php $fila['id'];?>\"> <?php echo $fila['titulo'] ?> </a></td> !--> <td> <?php echo $fila['duracion'] ?> </td> <td> <?php echo $fila['estado'] ?> </td> </tr> <?php endforeach; ?> </table>