Ver Mensaje Individual
  #2 (permalink)  
Antiguo 08/05/2008, 07:44
Avatar de Carlojas
Carlojas
 
Fecha de Ingreso: junio-2007
Ubicación: Shikasta
Mensajes: 1.272
Antigüedad: 17 años, 9 meses
Puntos: 49
Re: Fallo en acceso ficha de cliente

Te muestra la misma ficha, pues en la consulta no le estas pasando ningún parametro condicional WHERE, prueba así tu código

Código PHP:
<?php require_once('includes/sesion.php'); ?>
<?php 
require_once('Conect.php'); ?>
<?php
session_start
();
$rec "-1";
if (isset(
$_SESSION['id'])) {
  
$rec $_SESSION['id'];
}
$sql="select * from usuario where id = '$rec'";
        
$sql_exec mysql_query($sql) or die( mysql_error() );
        
$datos mysql_fetch_array($sql_exec);
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><?php 
    
echo $datos['nombre'];
    
?></td>
  </tr>
  <tr>
    <td><?php 
    
echo $datos['direccion'];
    
?></td>
  </tr>
  <tr>
    <td><?php 
    
echo $datos['telefono'];
    
?></td>
  </tr>
</table>
</body>
</html>
Saludos.