Ver Mensaje Individual
  #1 (permalink)  
Antiguo 20/06/2013, 15:58
Avatar de hulray
hulray
 
Fecha de Ingreso: septiembre-2006
Mensajes: 630
Antigüedad: 17 años, 7 meses
Puntos: 3
select no funciona, o se va el resultado

que tal colegas, tengo un pequeño problema. no me arroja los resultado en las cajas de texto.

mi cuenta.php
Código PHP:
<?

$nick   
$_SESSION[usuario];
$id_misusu $_GET['id_misusu'];

$result=mysql_query ("SELECT * FROM users ORDER BY id desc"

$conexion);
echo
"<h3 align=\"center\">Mi Cuenta</h3>";  
echo 
"<table border=0 width=90%><tr>"
echo 
"<tr>";
echo 
"<td></td><td></td><td>Folio</td><td>Cuenta</td><td>Nombre Real</td><td>E-Mail</td><td>Cargo</td><td>Activa</td></tr>
</tr>"
;

while(
$row=mysql_fetch_row($result)){

  echo 
"<tr>
    <td><td><a href=\"micuenta1.php?id_misusu=$row[0]\" target=\"_parent\"> <img src=\"../img/derec.gif\" width=16 height=16 alt=\"click\" border=0 align=left></a></td>
</td><td>$row[0]</td><td>$row[2]</td><td>$row[1]</td><td>$row[4]</td><td>$row[5]</td><td>$row[6]</td></tr>"
;
}
echo
"</table>
"
;
?>

micuenta1.php
Código PHP:
<?php
include('../config.php'); //incluimos el config.php que contiene los datos de la conexión a la db

//--> Datos Inspeccion

//-->
echo $id_misusu;

    
$sql "SELECT * from users where id='$id_misusu'";
    
$rs=mysql_query($sql);
    while(
$row=mysql_fetch_array($rs))
    {
    
    
$r_id       $row["id"];
    
$r_nombre   $row["nombre"];
    
$r_pass     $row["pass"];
    
$r_usuario  $row["nick"];
    
$r_mail     $row["mail"];
    
$r_cargo    $row["cargo"];
    
$r_fecha    $row["fecha"];
    
$r_level     $row["level"];
    
$r_active    $row["active"];
     }

    echo 
$r_nombre;

     include_once( 
"micuenta2.php" );


?>

micuenta2.php
Código PHP:
<!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>Sicos LTDA</title>
<link href="../estilo_sicos.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
#Layer1 {
    position:absolute;
    left:771px;
    top:114px;
    width:328px;
    height:50px;
    z-index:11;
}
#Layer2 {
    position:absolute;
    left:850px;
    top:175px;
    width:199px;
    height:24px;
    z-index:11;
}
body {
    background-color: #FFFFFF;
}
#Layer3 {
    position:absolute;
    left:168px;
    top:7px;
    width:946px;
    height:97px;
    z-index:11;
}
-->
</style>
</head>
<body class="home">
<div class="general";>
<div class="appsHeader">
  <p>  
  <td width="761" valign="top">
    
    <div align="left">
      <p><img src="http://www.forosdelweb.com/f18/img/Logo Sicos Chile.jpg" width="420" height="125" /></p>
    </div></td>
  <p>&nbsp;</p>
</div>
<div class="appsBody">
  <div align="center"></div>
  <div class="menu">
     <ul>
     <p>
       <?php
include_once ("../menu.php");
?>

</p>
     <p>&nbsp;</p>
     <table width="404" height="130" border="0">
       <tr>
         <td>Folio:</td>
         <td><input type="text" name="r_id" value="<? echo $r_id?>"/>
         </td>
         <td>&nbsp;</td>
         <td>&nbsp;</td>
         <td>&nbsp;</td>
       </tr>
       <tr>
         <td>Cuenta:</td>
         <td><input type="text" name="r_usuario" value="<? echo $r_usuario?>" /></td>
         <td>&nbsp;</td>
         <td><p>Nombre:</p></td>
         <td><input type="text" name="r_nombre" value="<? echo $r_nombre?>"/></td>
       </tr>
       <tr>
         <td>E-Mail</td>
         <td><input type="text" name="r_mail" value="<? echo $r_mail?>"/></td>
         <td>&nbsp;</td>
         <td>Cargo:</td>
         <td><input type="text" name="r_cargo" value="<? echo $r_cargo?>"/></td>
       </tr>
       <tr>
         <td>&nbsp;</td>
         <td>&nbsp;</td>
         <td>&nbsp;</td>
         <td>&nbsp;</td>
         <td>&nbsp;</td>
       </tr>
       <tr>
         <td>&nbsp;</td>
         <td>&nbsp;</td>
         <td>&nbsp;</td>
         <td>&nbsp;</td>
         <td>&nbsp;</td>
       </tr>
     </table>
         </form>

     <p>&nbsp;</p>
     <p>&nbsp;     </p>
     
</p>

Ojala puedan ayudarme...