Código HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <title>Pagina 1</title> </head> <body> <H1>Mostrar resultados de una consulta en una tabla</H1> <?php include("connect.php"); $link=Conectarse(); $result=mysql_query("select * from mi_tabla",$link); ?> <TABLE BORDER=0 CELLSPACING=1 CELLPADDING=1> <TR><TD> Id </TD><TD> De </TD><TD> Para </TD><TD> Fecha </TD></TR> <?php while($row = mysql_fetch_array($result)) { printf("<tr><td> %s</td><td> %s </td><td> %s </td><td> %s </td></tr>" , $row["ID"],$row["cliente"],$row["receptor"],$row["fecha"]); } mysql_free_result($result); mysql_close($link); ?> </table> </body> </html>
1º) Si entreo en index.php, vere una tabla en la que se muestran los datos recogidos por la base de datos, ordenados por ID, hasta ahí bien, ahora lo que necesito es que cuendo se clickea en el numero de ID se vaya a la página correspondiente (perfil), siendo el enlace del tipo enlace.php?id="aqui la id".