Código HTML:
<?php do { ?> <tr>//aqui paso la id <td><a href="detalle.php?recordID=<?php echo $row['id_']; ?>"><?php echo $row['nombre']; ?></a></td> <td><?php echo $row['apellido']; ?> </td> <td><?php echo $row['telefono']; ?> </td> </tr> <?php } while ($row = mysql_fetch_array($sql)); ?> </table>
se supone que con If (isset($_GET(id_))?
este es el codigo usando DW
Código HTML:
<?php echo $row_detalle['nombre']; ?>//se supone que tiene que tomar el nombre <?php require_once('Connections/seleccion.php'); ?> <?php if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } } $colname_detalle = "-1"; if (isset($_GET['id_'])) { $colname_detalle = $_GET['id_']; }//se supone que toma el vaor enviado mysql_select_db($database_seleccion, $seleccion); $query_detalle = sprintf("SELECT registro.nombre FROM registro WHERE id_ = %s", GetSQLValueString($colname_detalle, "int")); $detalle = mysql_query($query_detalle, $seleccion) or die(mysql_error()); $row_detalle = mysql_fetch_assoc($detalle); $totalRows_detalle = mysql_num_rows($detalle); mysql_free_result($detalle); ?>