Ver Mensaje Individual
  #3 (permalink)  
Antiguo 25/05/2012, 10:20
Avatar de CesarHC
CesarHC
 
Fecha de Ingreso: junio-2011
Ubicación: localhost
Mensajes: 566
Antigüedad: 12 años, 11 meses
Puntos: 56
Respuesta: Consultar a una base de datos MYSQL desde un link

Por lo que dices creo que quieres algo asi masndas por post la clave.

Mandar.php

Código PHP:
Ver original
  1. <?php
  2. require_once("conexion.php");
  3. $id=$_POST['id'];
  4. $query = mysql_query('SELECT id,titulo FROM videos ');
  5. while($fila = mysql_fetch_array($query)) {
  6.     echo "<table  border='0' >
  7.  <tr>
  8.    <td><a href='recibe.php?id=".$fila["id"]."' target='_blank'>".$fila['titulo']."</a></td>
  9.  </tr>
  10.  </table>";
  11. }
  12. ?>

y luego la recibes en otroarchivo.

recibe.php
Código PHP:
Ver original
  1. <?php
  2. require_once("conexion.php");
  3. $query = mysql_query("SELECT id,titulo, video WHERE id=$id");
  4. while($fila = mysql_fetch_array($query)) {
  5.     echo "<table border='0'>
  6.  <tr>
  7.    <td>".$fila['titulo']."</td>
  8.  </tr>
  9.  <tr>
  10.    <td>la url que tengas</td>
  11.  </tr>
  12.  
  13. </table>";
  14. }
  15. ?>

O entendi mal bueno espero que te ayude.
__________________
Solo la práctica no te traicionara ¡¡¡¡¡¡

Seguir el camino tu debes PHP The Right Way.