Foros del Web » Programando para Internet » PHP »

Problemas simple para mostrar datos

Estas en el tema de Problemas simple para mostrar datos en el foro de PHP en Foros del Web. HOla a todos amigos. Bueno he estado haciendo un simple ejemplo de mostrar los el nombre del usuario en una caja de texto, pero no ...
  #1 (permalink)  
Antiguo 29/09/2006, 09:34
Avatar de Nova  
Fecha de Ingreso: enero-2003
Ubicación: Hyo
Mensajes: 832
Antigüedad: 21 años, 3 meses
Puntos: 1
Problemas simple para mostrar datos

HOla a todos amigos.
Bueno he estado haciendo un simple ejemplo de mostrar los el nombre del usuario en una caja de texto, pero no consigo mostrarlo. y no se que error ocurre.
Código PHP:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Documento sin t&iacute;tulo</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<?php
$db 
mysql_connect("localhost","root","") or die ("Unable to connect to MySQL server.");
$datos=mysql_select_db ("proyectodb",$db);
$consulta"SELECT * from usuario WHERE usuario='Admin'";
$result =mysql_query($consulta,$db) or die(header ("No se pudo realizar la consulta"));
while (
$row mysql_fetch_array($result)) { 
$usuario $row["usuario"];
}
?>
<body>
<form name="form1" method="post" action="">
  <div align="center">
    <table width="200" border="1">
      <tr>
        <td>usuario</td>
        <td><input name="usuario" type="text" id="usuario" value=<?php '$usuario' ?>></td>
      </tr>
      </table>
  </div>
</form>
</body>
</html>
Gracias por la ayuda.
__________________
http://about.me/jemano
  #2 (permalink)  
Antiguo 29/09/2006, 09:39
Avatar de Erikfrancisco  
Fecha de Ingreso: noviembre-2003
Ubicación: Estado de México
Mensajes: 503
Antigüedad: 20 años, 5 meses
Puntos: 4
Y SI TU IMPUT LO PONES DE ESTE MODO:

<td><input name="usuario" type="text" id="usuario" value="<?php echo $usuario ?>"></td>

SUERTE
  #3 (permalink)  
Antiguo 29/09/2006, 09:43
Avatar de Nova  
Fecha de Ingreso: enero-2003
Ubicación: Hyo
Mensajes: 832
Antigüedad: 21 años, 3 meses
Puntos: 1
Recontra muchas gracias amigo Erikfrancisco, cosillas k ya estyo aprendiendo y gracias a ustedes.
__________________
http://about.me/jemano
  #4 (permalink)  
Antiguo 29/09/2006, 09:58
Avatar de Nova  
Fecha de Ingreso: enero-2003
Ubicación: Hyo
Mensajes: 832
Antigüedad: 21 años, 3 meses
Puntos: 1
Una pekeña consulta:
Creo k asi me va a ser muy extenso el codigo pensaba hacer de otra forma.
Código PHP:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Documento sin t&iacute;tulo</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<form name="form1" method="post" action="">
  <div align="center">
    <table width="200" border="1">
      <tr>
        <td>usuario</td>
        <td><input name="usuario" type="text" id="usuario"></td>
      </tr>
      </table>
  </div>
</form>
</body>
</html>
<?
$db 
mysql_connect("localhost","root","") or die ("Unable to connect to MySQL server.");
$datos=mysql_select_db ("proyectodb",$db);
$consulta"SELECT * from usuario WHERE usuario='Admin'";
$result =mysql_query($consulta,$db) or die(header ("No se pudo realizar la consulta"));
while (
$row mysql_fetch_array($result)) { 
$usuario=$row['usuario'];// DE AQUI SE CAMBIA EL VALOR DE LA CAJA DE TEXTO
}
?>
gRACIAS, SE PODRIA HACER ASI, O TENGO K HACER PASAR EL VALOR CON OTRA VARIABLE NECESARIAMENTE (COMO SE DIO SOLUCION ARRIBA).
__________________
http://about.me/jemano
  #5 (permalink)  
Antiguo 29/09/2006, 10:02
Avatar de Erikfrancisco  
Fecha de Ingreso: noviembre-2003
Ubicación: Estado de México
Mensajes: 503
Antigüedad: 20 años, 5 meses
Puntos: 4
No Entiendo Muy Bien Tu Pregunta Ademas Que Es Lo Que Intentas Hacer Con Esa Secuencia De Comandos Que Acabas De Mostrar?
  #6 (permalink)  
Antiguo 29/09/2006, 10:07
Avatar de Nova  
Fecha de Ingreso: enero-2003
Ubicación: Hyo
Mensajes: 832
Antigüedad: 21 años, 3 meses
Puntos: 1
bueno lo que me ayudaste a dar solucion arriba, esta OK pero el problema esk tengo que mostrar como 20 datos del usuario en cajas de texto, y por eso tendria que utiliozar 20 variable para pasar y luego esa variables pasar a las cajas de texto. Por eso lo que quiero esk mientras va haciendo el WHILE que vaya pasando los datos a las cajas de texto haciendo como mostre:
While ($row = mysql_fetch_array($result)) {
$id_cajatexto = $row['campo_tabla'];
}
Ojala que me haya entendido gracias..
__________________
http://about.me/jemano
  #7 (permalink)  
Antiguo 29/09/2006, 10:30
Avatar de Erikfrancisco  
Fecha de Ingreso: noviembre-2003
Ubicación: Estado de México
Mensajes: 503
Antigüedad: 20 años, 5 meses
Puntos: 4
BUENO PUES PARA LO QUE QUIERES TE RECOMIENDO HACER ALGO PARECIDO A ESTO:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Documento sin t&iacute;tulo</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<?php
$db = mysql_connect("localhost","root","") or die ("Unable to connect to MySQL server.");
$datos=mysql_select_db ("proyectodb",$db);
$array_usuarios = array ( 'Erik', 'Francisco', 'Ian'); // este es el array que le pasaras a tu consulta
$consulta= "SELECT * from usuario WHERE usuario IN ($array_usuarios)";
$result =mysql_query($consulta,$db) or die(header ("No se pudo realizar la consulta"));
?>

<body>
<form name="form1" method="post" action="">
<div align="center">
<table width="200" border="1">
<?php
while ($row = mysql_fetch_array ($result) )
{
$usuario = $row["usuario"];
?>

<tr>
<td>usuario</td>
<td><input name="usuario" type="text" id="usuario" value="<?php echo $usuario ?>"></td>
</tr>
<?php
}
?>

</table>
</div>
</form>
</body>
</html>

NO ESTOY MUY SEGURO QUE TE FUNCIONE PORQUE NO LO HE PROBADO PERO LA IDEA ES ESA. ESPERO HABERME DADO A ENTENDER. SUERTE
  #8 (permalink)  
Antiguo 29/09/2006, 16:08
Avatar de Nova  
Fecha de Ingreso: enero-2003
Ubicación: Hyo
Mensajes: 832
Antigüedad: 21 años, 3 meses
Puntos: 1
Nop, no funciona pero muchas gracias ya se por donde vas muy bien por la idea.
__________________
http://about.me/jemano
  #9 (permalink)  
Antiguo 29/09/2006, 17:22
Avatar de Nova  
Fecha de Ingreso: enero-2003
Ubicación: Hyo
Mensajes: 832
Antigüedad: 21 años, 3 meses
Puntos: 1
Weno aki tengo el ejemplo completo, pero hay un pekeño inconveniente NO MUESTRA LOS DATOSSS
Código PHP:
<?
$db 
mysql_connect("localhost","root","") or die ("Unable to connect to MySQL server.");
$datos=mysql_select_db ("proyectodb",$db);
$consulta"SELECT * from usuario WHERE usuario='Admin'";
$result =mysql_query($consulta,$db) or die(header ("No se pudo realizar la consulta"));
while (
$row mysql_fetch_array($result)) { 
        
$codver1=$row["codver"];
        echo 
"Hola a todos    $codver1";
        
$nombre1=$row["nombre"];
        
$apepat1=$row["apepat"];
        
$apemat1=$row["apemat"];
        
$dni1=$row["dni"];
        
$mail1=$row["email"];
        
$telefo1$row["telefo"];
        
$dire1=$row["dire"];
        
$depa1=$row["depa"];
        
$provin=$row["provin"];
        
$cuidad1=$row["cuidad"];
        
$sexo1$row["sexo"];
        
$insti1=$row["insti"];
        
$cargo1=$row["cargo"];
        
$como1=$row["como"];        

}
?>
<html>
    <head><title>Formulario de Inscripci&oacute;n de Usuario</title>
    <style type="text/css">
<!--
.Estilo3 {color: #FF0000}
body {
    background-image: url(images/f-ins.jpg);
    margin-left: 0px;
    margin-top: 0px;
    margin-right: 0px;
    margin-bottom: 0px;
}
.Estilo8 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; }
.Estilo10 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; }
.Estilo12 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; font-weight: bold; }
.Estilo15 {
    color: #FF0000;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 12px;
}
-->
    </style>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head>
    
    <body bgcolor="#ffffff" style="background-attachment: fixed" onLoad="size()">
    <div align="center">
      <table width="956" border="0">
    <form action="" method="post" name="form1">
      <tr>
        <th scope="col"><span class="Estilo10">INSCRIPCI&Oacute;N DE USUARIO</span></th>
      </tr>
      <tr>
        <th width="950" scope="col">        <table width="947" border="0"  align="left">
                  
        <tr>
              <th colspan="2" scope="col"><span class="Estilo12">
              </span></th>
            </tr>
            <tr>
              <th colspan="2" scope="col"><div align="left" class="Estilo12">
              INFORMACI&Oacute;N PERSONAL</div></th>
            </tr>
            <tr>
              <td width="326"><strong class="Estilo8">N Verificaci&oacute;n:</strong></td>
              <td><input name="veri" type="text"   readonly="true" value= <?php echo $codver1 ?>>
              
              <input name="numveri" type="hidden" id="numveri" value="valor"></td>
            </tr>
            <tr>
              <td class="Estilo8">Direccion de Correo Eletr&oacute;nico:</td>
              <td><span class="Estilo3">
                <input name="email" type="text" size="50" value= <?php echo $email1 ?> > 
                <?php echo "Valor de PHP $email1" ?>
</span></td>
            </tr>
            <tr>
              <td class="Estilo8">Sexo:</td>
              <td>                <p>
                  <label>
                  <input name="sexo" type="radio" value="hombre" <?php if ( $sexo1== 'hombre') echo 'checked'?>>Hombre</label>
                  <input name="sexo" type="radio" value="mujer"  <?php if ( $sexo1== 'mujer') echo 'checked'?>><label>Mujer</label>
                  <br>
               </p></td>
            </tr>
            <tr>
              <td class="Estilo8"><strong>Nombres</strong>:<strong><span class="Estilo3">*</span></strong></td>
              <td><span class="Estilo3">
                <input name="nombre" type="text" id="nombre"  size="50" value= <?php echo $nombre1 ?> >
              </span></td>
            </tr>
            <tr>
              <td><strong class="Estilo8">Apellido Paterno:<span class="Estilo3">*</span></strong></td>
              <td><span class="Estilo3">
                <input name="apepat" type="text"  size="35" value= <?php echo $apepat1 ?>>
              </span></td>
            </tr>
            <tr>
              <td><strong class="Estilo8">Apellidos Materno: <span class="Estilo3">*</span></strong></td>
              <td><span class="Estilo3">
                <input name="apemat" type="text" size="35" value = <?php echo $apemat1 ?>>
              </span></td>
            </tr>
            <tr>
              <td><strong class="Estilo8">DNI</strong>:<strong><span class="Estilo3">*</span></strong></td>
              <td><span class="Estilo3">
                <input name="dni" type="text" size="8" value= <?php echo $dni1 ?>>
              </span></td>
            </tr>
            <tr>
              <td><strong class="Estilo8">Tel&eacute;fonos:</strong></td>
              <td><span class="Estilo3">
                <input name="telefono" type="text" id="telefono" size="35" value = <?php echo $telefo1 ?>>
              </span></td>
            </tr>
            <tr>
              <td><strong class="Estilo8">Direcci&oacute;n</strong>:<strong><span class="Estilo3">*</span></strong></td>
              <td><span class="Estilo3">
                <input name="direccion" type="text" id="direccion" size="50" value = <?php echo $dire1 ?>>
              </span></td>
            </tr>
            <tr>
              <td><strong class="Estilo8">Cuidad</strong>:<strong><span class="Estilo3">*</span></strong></td>
              <td><span class="Estilo3">
                <input name="cuidad" type="text"  size="30" value = <?php echo $cuidad1 ?>>
              </span></td>
            </tr>
            <tr>
              <td><strong class="Estilo8">Provincia</strong>:<strong><span class="Estilo3">*</span></strong></td>
              <td><span class="Estilo3">
                <input name="provincia" type="text" id="provincia"  size="30" value = <?php echo $provin1 ?>>
              </span></td>
            </tr>
            <tr>
              <td><strong class="Estilo8">Departamento</strong>:<strong><span class="Estilo3">*</span></strong></td>
              <td><span class="Estilo3">
                <input name="departamento" type="text" id="departamento" size="30" value = <?php echo $depa1 ?>>
              </span></td>
            </tr>
            <tr>
              <td colspan="2"><strong class="Estilo8">INFORMACI&Oacute;N DE LA INSTITUCI&Oacute;N <span class="Estilo15"></span></strong><span class="Estilo3">
              </span></td>
            </tr>
            <tr>
              <td><p>Nombre de la Insituci&oacute;n proveniente:</p>              </td>
              <td><span class="Estilo3">
                <input name="institucion" type="text" id="institucion" size="50" value = <?php echo $insti1 ?>>
</span></td>
            </tr>
            <tr>
              <td>Cargo:</td>
              <td><span class="Estilo3">
                <input name="cargo" type="text" id="cargo" size="50" value = <?php echo $cargo1 ?>>
              </span></td>
            </tr>
            <tr>
              <td colspan="2">OTROS</td>
            </tr>
            <tr>
              <td>Como se entero del Curso : </td>
              <td><span class="Estilo3">
                <input name="como" type="text" id="como" size="50" value = <?php echo $como ?>>
              </span></td>
            </tr>
                 
  </table></th></tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td></td>
      </tr>
      <tr>
        <td><p class="Estilo8">
            <input name="submit" type="submit" value="Actualizar" align="right" >
            

 </p>        </td>
      </tr>
    </form>
        </table>
    </div>
    </body>
</html>
K raro... con una prueba que hice, mostrando solo algunos datos del usuario me sale pero cuando quiero mostrar todo ni rastro de los datos, por favor si puedieran ayudarme.
__________________
http://about.me/jemano

Última edición por Nova; 29/09/2006 a las 17:30
  #10 (permalink)  
Antiguo 29/09/2006, 19:09
Avatar de Nova  
Fecha de Ingreso: enero-2003
Ubicación: Hyo
Mensajes: 832
Antigüedad: 21 años, 3 meses
Puntos: 1
weno ya arregle el problemilla pero ahora cuando ejecuto todo el codigo puedo podificar los datos y a la hora de actualizar se cargan los datos antiguos, pero en la BD si se han modicado.
ENTONCES COMO PUEDO HACER PARA PODER CARGAR LOS DATOS QUE YA ACTUALIZE, GRACIAS
Código PHP:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Documento sin t&iacute;tulo</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
.Estilo3 {color: #FF0000}
-->
</style>
</head>
<?
$db 
mysql_connect("localhost","root","") or die ("Unable to connect to MySQL server.");
$datos=mysql_select_db ("proyectodb",$db);
$consulta"SELECT * from usuario WHERE usuario='Admin'";
$result =mysql_query($consulta,$db) or die(header ("No se pudo realizar la consulta"));
while (
$row mysql_fetch_array($result)) { 
$codver1=$row['codver'];
$usuario1=$row['usuario'];
$email1=$row['email'];
$sexo1=$row['sexo'];
$nombre1=$row['nombre'];
$apepat1=$row['apepat'];
$apemat1=$row['apemat'];
$dni1=$row['dni'];
$telefo1=$row['telefo'];
$dire1=$row['dire'];
$cuidad1=$row['cuidad'];
$provin1=$row['provin'];
$depa1=$row['depa'];
$insti1=$row['insti'];
$cargo1=$row['cargo'];
$como1=$row['como'];
//value="<?php echo $usuario 
}
?>
<body>
<form method="post" action="prueba.php?act=acepta">
  <div align="center">
    <table width="860" border="1">
      <tr>
        <td width="201">Cod Ver </td>
        <td width="643"><input name="veri" type="text"  readonly="true"  value= <?php echo $codver1 ?>></td>
      </tr>
      <tr>
        <td>Email</td>
        <td><span class="Estilo3">
          <input name="email" type="text" size="50" value= <?php echo $email1 ?> >
        </span></td>
      </tr>
      <tr>
        <td>Sexo</td>
        <td><label>
          <input name="sexo" type="radio" value="hombre" <?php if ( $sexo1== 'hombre') echo "checked"?>>
          Hombre</label>
          <input name="sexo" type="radio" value="mujer"  <?php if ( $sexo1== 'mujer') echo "checked"?>>
        Mujer</td>
      </tr>
      <tr>
        <td>Nombres</td>
        <td><span class="Estilo3">
          <input name="nombre" type="text" id="nombre"   readonly="true"  size="50" value= <?php echo $nombre1 ?> >
        </span></td>
      </tr>
      <tr>
        <td>Apellido Parterno </td>
        <td><span class="Estilo3">
          <input name="apepat" type="text"  readonly="true"  size="35" value= <?php echo $apepat1 ?>>
        </span></td>
      </tr>
      <tr>
        <td>Apellido Materno </td>
        <td><span class="Estilo3">
          <input name="apemat" type="text"  readonly="true"  size="35" value = <?php echo $apemat1 ?>>
        </span></td>
      </tr>
      <tr>
        <td>DNI</td>
        <td><span class="Estilo3">
          <input name="dni" type="text" size="8" value= <?php echo $dni1 ?>>
        </span></td>
      </tr>
      <tr>
        <td>Telefonos:</td>
        <td><span class="Estilo3">
          <input name="telefono" type="text" id="telefono" size="35" value = <?php echo $telefo1 ?>>
        </span></td>
      </tr>
      <tr>
        <td>Direccion</td>
        <td><span class="Estilo3">
          <input name="direccion" type="text" id="direccion" size="50" value = <?php echo $dire1 ?>>
        </span></td>
      </tr>
      <tr>
        <td>Cuidad</td>
        <td><span class="Estilo3">
          <input name="cuidad" type="text"  size="30" value = <?php echo $cuidad1 ?>>
        </span></td>
      </tr>
      <tr>
        <td>Provincia</td>
        <td><span class="Estilo3">
          <input name="provincia" type="text" id="provincia"  size="30" value = <?php echo $provin1 ?>>
        </span></td>
      </tr>
      <tr>
        <td>Departamento:</td>
        <td><span class="Estilo3">
          <input name="departamento" type="text" id="departamento" size="30" value = <?php echo $depa1 ?>>
        </span></td>
      </tr>
      <tr>
        <td colspan="2">De la instiucion</td>
      </tr>
      <tr>
        <td>Instituxcion Proveniente </td>
        <td><span class="Estilo3">
          <input name="institucion" type="text" id="institucion" size="50" value = <?php echo $insti1 ?>>
        </span></td>
      </tr>
      <tr>
        <td>Cargo</td>
        <td><span class="Estilo3">
          <input name="cargo" type="text" id="cargo" size="50" value = <?php echo $cargo1 ?>>
        </span></td>
      </tr>
      <tr>
        <td>Otro</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>Como se entero </td>
        <td><span class="Estilo3">
          <input name="como" type="text" id="como" size="50" value = <?php echo $como1 ?>>
        </span></td>
      </tr>
      <tr>
        <td><input type="submit" name="Submit" value="Actualizar"></td>
        <?php
        
//-mysql_free_result($consulta);
        //-mysql_close();
        
?>
        <td><?php
            
if ($_GET['act']=="acepta"){
                
$veri1=$_POST['veri'];
                
$nombres1=$_POST['nombre'];
                
$apepat1=$_POST['apepat'];
                
$apemat1=$_POST['apemat'];
                
$dni1$_POST['dni'];
                
$mail1=$_POST['email'];
                
$telefono1$_POST['telefono'];
                
$direccion1=$_POST['direccion'];
                
$departamento1=$_POST['departamento'];
                
$provincia1=$_POST['provincia'];
                
$cuidad1=$_POST['cuidad'];
                
$sexo1$_POST['sexo'];
                
$institucion1=$_POST['institucion'];
                
$cargo1=$_POST['cargo'];
                
$como1=$_POST['como'];        
                
$db mysql_connect("localhost","root","");
                
mysql_select_db (proyectodb);
                
$result mysql_query ("SELECT usuario FROM usuario WHERE codver = '$veri1'");
                if(
mysql_num_rows($result)==0){
//-                    header("Location: verificar_user.php");
//-                    exit();
                
echo "NO encontro resultados";
                }else{
                    if(
strlen($nombres1)==|| strlen($apepat1)==|| strlen($apemat1)==|| strlen($dni1)==|| strlen($mail1)==|| strlen($direccion1)==|| strlen($cuidad1)==|| strlen($provincia1)==|| strlen($departamento1)==|| strlen($institucion1)==|| strlen($cargo1)==|| strlen($como1)==0)
                    {
                    
header("Location: adduser.php?var=$veri1");
                    }
                }
                if(
mysql_num_rows($result)!=0)    {
                        
//-$actualizo1=1; //1 = ya actualizo sus datos
                        
mysql_query("UPDATE usuario SET nombre='$nombres1', apepat='$apepat1', apemat='$apemat1', dni='$dni1', email='$mail1',sexo='$sexo1',telefo='$telefono1', dire='$direccion1', cuidad='$cuidad1', provin='$provincia1', depa='$departamento1',insti='$institucion1',cargo='$cargo1', como='$como1'  WHERE codver='$veri1'");
                        
mysql_close($db);
                }    
            }
?></td>
      </tr>
    </table>
  </div>
</form>
</body>
</html>
__________________
http://about.me/jemano
  #11 (permalink)  
Antiguo 30/09/2006, 09:42
Avatar de Erikfrancisco  
Fecha de Ingreso: noviembre-2003
Ubicación: Estado de México
Mensajes: 503
Antigüedad: 20 años, 5 meses
Puntos: 4
Y SI TU CODIGO LO CAMBIAS DE ESTA MENERA:

Código PHP:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 
<html> 
<head> 
<title>Documento sin t&iacute;tulo</title> 
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> 
<style type="text/css"> 
<!-- 
.Estilo3 {color: #FF0000} 
--> 
</style> 
</head> 
<body> 

<?php
$db mysql_connect'localhost''root''' ) or die ( "Unable to connect to MySQL server." ); 
$datos mysql_select_db 'proyectodb'$db ); 

if ( isset ( 
$_POST['submit'] ) )
{
   
$consulta "UPDATE usuario SET ";
   
$consulta .= "codver = '".$_POST['codver']."',";
   
$consulta .= "email = '".$_POST['email']."',";
   
$consulta .= "sexo = '".$_POST['sexo']."',";
   
$consulta .= "nombre = '".$_POST['nombre']."',";
   
$consulta .= "apepat = '".$_POST['apepat']."',";
   
$consulta .= "apemat = '".$_POST['apemat']."',";
   
$consulta .= "dni = '".$_POST['dni']."',";
   
$consulta .= "telefo = '".$_POST['telefo']."',";
   
$consulta .= "dire = '".$_POST['dire']."',";
   
$consulta .= "cuidad = '".$_POST['cuidad']."',";
   
$consulta .= "provin = '".$_POST['provin']."',";
   
$consulta .= "depa = '".$_POST['depa']."',";
   
$consulta .= "insti = '".$_POST['insti']."',";
   
$consulta .= "cargo = '".$_POST['cargo']."',";
   
$consulta .= "como = '".$_POST['como']."'";
   
$consulta .= " WHERE usuario = '".$_POST['usuario']."'";
   
$result mysql_query $consulta );

   
$consulta3 "SELECT * FROM clientes WHERE idcliente = '".$_POST['usuario']."'";
   
$result3 mysql_query $consulta3 );
   
$fila mysql_fetch_array $result3 );

   echo 
"El registro fue actualizado y ahora contiene los siguientes datos:<br/>";
   echo 
"<input type = 'text' name = 'usuario' value = '".$fila['usuario']."'><br/>";
   echo 
"<input type = 'text' name = 'codver' value = '".$fila['codver']."'><br/>";
   echo 
"<input type = 'text' name = 'email' value = '".$fila['email']."'><br/>";
   echo 
"<input type = 'text' name = 'sexo' value = '".$fila['sexo']."'><br/>";
   echo 
"<input type = 'text' name = 'nombre' value = '".$fila['nombre']."'><br/>";
   echo 
"<input type = 'text' name = 'apepat' value = '".$fila['apepat']."'><br/>";
   echo 
"<input type = 'text' name = 'apemat' value = '".$fila['apemat']."'><br/>";
   echo 
"<input type = 'text' name = 'dni' value = '".$fila['dni']."'><br/>";
   echo 
"<input type = 'text' name = 'telefo' value = '".$fila['telefo']."'><br/>";
   echo 
"<input type = 'text' name = 'dire' value = '".$fila['dire']."'><br/>";
   echo 
"<input type = 'text' name = 'cuidad' value = '".$fila['cuidad']."'><br/>";
   echo 
"<input type = 'text' name = 'provin' value = '".$fila['provin']."'><br/>";
   echo 
"<input type = 'text' name = 'depa' value = '".$fila['depa']."'><br/>";
   echo 
"<input type = 'text' name = 'insti' value = '".$fila['insti']."'><br/>";
   echo 
"<input type = 'text' name = 'cargo' value = '".$fila['cargo']."'><br/>";
   echo 
"<input type = 'text' name = 'como' value = '".$fila['como']."'>";

   
mysql_free_result $result3 );
}

else
{
   
$usuario Admin;
   
$consulta2 "SELECT * FROM usuario WHERE usuario = '".$usuario."'"
   
$result2 mysql_query $consulta2$db ) or die ( header ("No se pudo realizar la consulta" ) );
   
$fila2 mysql_fetch_array $result2 );
?>
<form name = "formu" action = "<?php $_SERVER['PHP_SELFT']; ?>" method="post" > 
<div align="center"> 
   <table width="860" border="1"> 
   <tr> 
      <td width="201">Cod Ver </td> 
      <td width="643"><input name="codver" type="text"  readonly="true"  value= "<?php echo $fila2['codver']; ?>"></td> 
   </tr> 
   <tr> 
      <td>Email</td> 
      <td><span class="Estilo3"> 
      <input name="emaill" type="text" size="50" value= "<?php echo $fila2['email']; ?>"></span>
   </td> 
   </tr> 
   <tr> 
      <td>Sexo</td> 
      <td><label> 
      <input name="sexo" type="radio" value = "hombre" <?php if ( $sexo == 'hombre' ) echo "checked"?>
      Hombre</label> 
      <input name="sexo" type="radio" value = "mujer"  <?php if ( $sexo == 'mujer' ) echo "checked"?>
      Mujer</td> 
   </tr> 
   <tr> 
      <td>Nombres</td> 
      <td><span class="Estilo3"> 
      <input name="nombre" type="text" id="nombre"   readonly="true"  size="50" value= "<?php echo $fila2['nombre']; ?>" > 
      </span></td> 
   </tr> 
   <tr> 
      <td>Apellido Parterno </td> 
      <td><span class="Estilo3"> 
      <input name="apepat" type="text"  readonly="true"  size="35" value= "<?php echo $fila2['apepat']; ?>"> 
      </span></td> 
   </tr> 
   <tr> 
      <td>Apellido Materno </td> 
      <td><span class="Estilo3"> 
      <input name="apemat" type="text"  readonly="true"  size="35" value = "<?php echo $fila2['apemat']; ?>"> 
      </span></td> 
   </tr> 
   <tr> 
      <td>DNI</td> 
      <td><span class="Estilo3"> 
      <input name="dni" type="text" size="8" value= "<?php echo $fila2['dni']; ?>"> 
      </span></td> 
   </tr> 
   <tr> 
      <td>Telefonos:</td> 
      <td><span class="Estilo3"> 
      <input name="telefo" type="text" id="telefono" size="35" value = "<?php echo $fila2['telefo']; ?>"> 
      </span></td> 
   </tr> 
   <tr> 
      <td>Direccion</td> 
      <td><span class="Estilo3"> 
      <input name="dire" type="text" id="direccion" size="50" value = "<?php echo $fila2['dire']; ?>"> 
      </span></td> 
   </tr> 
   <tr> 
      <td>Cuidad</td> 
      <td><span class="Estilo3"> 
      <input name="cuidad" type="text"  size="30" value = "<?php echo $fila2['cuidad']; ?>"> 
      </span></td> 
   </tr> 
   <tr> 
      <td>Provincia</td> 
      <td><span class="Estilo3"> 
      <input name="provin" type="text" id="provincia"  size="30" value = "<?php echo $fila2['provin']; ?>"> 
      </span></td> 
   </tr> 
   <tr> 
      <td>Departamento:</td> 
      <td><span class="Estilo3"> 
      <input name="depa" type="text" id="departamento" size="30" value = "<?php echo $fila2['depa']; ?>"> 
      </span></td> 
   </tr> 
   <tr> 
      <td colspan="2">De la instiucion</td> 
   </tr> 
   <tr> 
      <td>Instituxcion Proveniente </td> 
      <td><span class="Estilo3"> 
      <input name="insti" type="text" id="institucion" size="50" value = "<?php echo $fila2['insti']; ?>"> 
      </span></td> 
   </tr> 
   <tr> 
      <td>Cargo</td> 
      <td><span class="Estilo3"> 
      <input name="cargo" type="text" id="cargo" size="50" value = "<?php echo $fila2['cargo']; ?>"> 
      </span></td> 
   </tr> 
   <tr> 
      <td>Otro</td> 
      <td>&nbsp;</td> 
   </tr> 
   <tr> 
      <td>Como se entero </td> 
      <td><span class="Estilo3"> 
      <input name="como" type="text" id="como" size="50" value = "<?php echo $fila2['como']; ?>"> 
      </span></td> 
   </tr> 
   <tr> 
      <td><input type = "submit" name = "submit" value = "Actualizar"></td>
   </tr>
   </table>
</div>
</form>
<?php
mysql_free_result 
$result2 );
}
?>
HOJALA TE PUEDA SERVIR O TE DE UNA MEJOR IDEA DEL PANORAMA. SUERTE : arriba:

Última edición por Erikfrancisco; 02/10/2006 a las 10:24
  #12 (permalink)  
Antiguo 30/09/2006, 11:26
Avatar de Nova  
Fecha de Ingreso: enero-2003
Ubicación: Hyo
Mensajes: 832
Antigüedad: 21 años, 3 meses
Puntos: 1
Hora si k me dajeste frio amigo Erikfrancisco, no entiendo que va a hacer el codigo (te lo digo tambien porque no funciona), segun lo que estube chekeando, el codigo carga crea los TexBox y cuando actualizamos los datos crea otros TextBox, los cuales mostraran los nuevos datos, bueno eso fue lo que entendi.
Pero todo va bien hasta que actualiza, se cargan los textbox pero no se muestran datos (bueno si eso es lo que me querias explicar).
Gracias amigo, por la ayuda
POR OTRA PARTE LE DI SOLUCION AL CODIGO ANTERIOR CON SOLO PONER LUEGO DEL UPDATE DE LA TABLA UN header("Location: prueba.php");
PERO MI PREGUNTA ES PORQUE CUANDO PONGO ESTE CODIGO A TODOS LOS VALUES DE LOS TEXTOBOX PERO SIN DOBLE COMILLA: <input name="nombre" type="text" size="50" value= <?php echo $nombre1 ?> > SOLO SE MUESTRA EL PRIMER NOMBREMAS NO EL SEGUNDO NOMBRE, PERO SI LE PONGO CON DOBLE COMILLA SI SALEN (NO ENTIENDO) <input name="nombre" type="text" size="50" value= "<?php echo $nombre1 ?>" >
__________________
http://about.me/jemano

Última edición por Nova; 30/09/2006 a las 12:12
  #13 (permalink)  
Antiguo 30/09/2006, 14:54
Avatar de Erikfrancisco  
Fecha de Ingreso: noviembre-2003
Ubicación: Estado de México
Mensajes: 503
Antigüedad: 20 años, 5 meses
Puntos: 4
Me parece que el código que te mande por ultima vez no funciona por estos detalles :

$consulta .= " WHERE usuario = '".$_POST['usuario']."'";
$result = mysql_query ( $consulta );
$consulta3 = "SELECT * FROM clientes WHERE idcliente = '".$_POST['usuario']."'";
$result3 = mysql_query ( $consulta3 );

Y en esta otra seccion:

$usuario = Admin;

En realidad creo que debería ser:

$consulta3 = "SELECT * FROM usuario WHERE usuario = '".$_POST['usuario']."'";

$usuario = "Admin";

Y si aun así todavía no te funciona checa los nombres de los campos y de las tablas probablemente estan mal ya que yo no me los se. Por otra parte te recomiendo que en tus tablas les agregues un identificador único ya que al hacer tus consultas puedes tener problemas puesto que puede haber más de un usuario llamado Admin por decir algo mejor crea un campo de tipo autoincrement para evitar este tipo de errores (¿Checa eso quieres? veras que te evitará muchos dolores de cabeza).

Con respecto a lo de las comillas creo que esto es cuestion de sintaxis html como por ejemplo name = "algo" o type = "algo" me entiendes? asi que con el value es lo mismo value= "<?php echo $nombre1 ?>" así le asignas un valor espero haber sido claro y que te sirva de algo. Suerte amigo
  #14 (permalink)  
Antiguo 30/09/2006, 17:26
Avatar de Nova  
Fecha de Ingreso: enero-2003
Ubicación: Hyo
Mensajes: 832
Antigüedad: 21 años, 3 meses
Puntos: 1
Cita:
Iniciado por Erikfrancisco Ver Mensaje
Me parece que el código que te mande por ultima vez no funciona por estos detalles :

$consulta .= " WHERE usuario = '".$_POST['usuario']."'";
$result = mysql_query ( $consulta );
$consulta3 = "SELECT * FROM clientes WHERE idcliente = '".$_POST['usuario']."'";
$result3 = mysql_query ( $consulta3 );
Hola amigo Erikfrancisco.
Bueno modifique el codigo y ahora si se muestran los datos en ambos lados (antes de hacer UPDATE y despues).
Pero el problema es que no se modifican los datos entonces supongo que la parte del UPDATE esta mal o no se que pueda suceder.
Con respecto al campo con Unicidad, voy a hacer unico el campo de codVER (codigo de Vefiricación), pues el nombre de usuario yo creare con un numero aleatorio .
Aqui te dejo la BD proyectodb.
http://www.fondoverde.org/jemano/usuario.sql
y aqui esta el codigo corregido pero como te comente no funciona el UPDATE:
Código PHP:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 
<html> 
<head> 
<title>Documento sin t&iacute;tulo</title> 
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> 
<style type="text/css"> 
<!-- 
.Estilo3 {color: #FF0000} 
--> 
</style> 
</head> 
<body> 

<?php
$db mysql_connect'localhost''root''' ) or die ( "Unable to connect to MySQL server." ); 
$datos mysql_select_db 'proyectodb'$db ); 

if ( isset ( 
$_POST['submit'] ) )
{
$consulta "UPDATE usuario SET ";
$consulta .= "codver = '".$_POST['codver']."',";
$consulta .= "email = '".$_POST['email']."',";
$consulta .= "sexo = '".$_POST['sexo']."',";
$consulta .= "nombre = '".$_POST['nombre']."',";
$consulta .= "apepat = '".$_POST['apepat']."',";
$consulta .= "apemat = '".$_POST['apemat']."',";
$consulta .= "dni = '".$_POST['dni']."',";
$consulta .= "telefo = '".$_POST['telefo']."',";
$consulta .= "dire = '".$_POST['dire']."',";
$consulta .= "cuidad = '".$_POST['cuidad']."',";
$consulta .= "provin = '".$_POST['provin']."',";
$consulta .= "depa = '".$_POST['depa']."',";
$consulta .= "insti = '".$_POST['insti']."',";
$consulta .= "cargo = '".$_POST['cargo']."',";
$consulta .= "como = '".$_POST['como']."'";
$consulta .= " WHERE usuario = '".$_POST['usuario']."'";
$result mysql_query $consulta );

$consulta3 "SELECT * FROM usuario WHERE codver = '".$_POST['codver']."'";
$result3 mysql_query $consulta3 );
$fila mysql_fetch_array $result3 );

echo 
"El registro fue actualizado y ahora contiene los siguientes datos:<br/>";
echo 
"<input type = 'text' name = 'usuario' value = '".$fila['usuario']."'><br/>";
echo 
"<input type = 'text' name = 'codver' value = '".$fila['codver']."'><br/>";
echo 
"<input type = 'text' name = 'email' value = '".$fila['email']."'><br/>";
echo 
"<input type = 'text' name = 'sexo' value = '".$fila['sexo']."'><br/>";
echo 
"<input type = 'text' name = 'nombre' value = '".$fila['nombre']."'><br/>";
echo 
"<input type = 'text' name = 'apepat' value = '".$fila['apepat']."'><br/>";
echo 
"<input type = 'text' name = 'apemat' value = '".$fila['apemat']."'><br/>";
echo 
"<input type = 'text' name = 'dni' value = '".$fila['dni']."'><br/>";
echo 
"<input type = 'text' name = 'telefo' value = '".$fila['telefo']."'><br/>";
echo 
"<input type = 'text' name = 'dire' value = '".$fila['dire']."'><br/>";
echo 
"<input type = 'text' name = 'cuidad' value = '".$fila['cuidad']."'><br/>";
echo 
"<input type = 'text' name = 'provin' value = '".$fila['provin']."'><br/>";
echo 
"<input type = 'text' name = 'depa' value = '".$fila['depa']."'><br/>";
echo 
"<input type = 'text' name = 'insti' value = '".$fila['insti']."'><br/>";
echo 
"<input type = 'text' name = 'cargo' value = '".$fila['cargo']."'><br/>";
echo 
"<input type = 'text' name = 'como' value = '".$fila['como']."'>";

mysql_free_result $result3 );
}

else
{
$usuario Admin;
$consulta2 "SELECT * FROM usuario WHERE usuario = '".$usuario."'"
$result2 mysql_query $consulta2$db ) or die ( header ("No se pudo realizar la consulta" ) );
$fila2 mysql_fetch_array $result2 );
?>
<form name = "formu" action = "<?php $_SERVER['PHP_SELFT']; ?>" method="post" > 
<div align="center"> 
<table width="860" border="1"> 
<tr> 
<td width="201">Cod Ver </td> 
<td width="643"><input name="codver" type="text" readonly="true" value= "<?php echo $fila2['codver']; ?>"></td> 
</tr> 
<tr> 
<td>Email</td> 
<td><span class="Estilo3"> 
<input name="emaill" type="text" size="50" value= "<?php echo $fila2['email']; ?>"></span>
</td> 
</tr> 
<tr> 
<td>Sexo</td> 
<td><label> 
<input name="sexo" type="radio" value = "hombre" <?php if ( $fila2['sexo'] == 'hombre' ) echo 'checked'?>
Hombre</label> 
<input name="sexo" type="radio" value = "mujer" <?php if ( $fila2['sexo'] == 'mujer' ) echo 'checked'?>
Mujer</td> 
</tr> 
<tr> 
<td>Nombres</td> 
<td><span class="Estilo3"> 
<input name="nombre" type="text" id="nombre" readonly="true" size="50" value= "<?php echo $fila2['nombre']; ?>" > 
</span></td> 
</tr> 
<tr> 
<td>Apellido Parterno </td> 
<td><span class="Estilo3"> 
<input name="apepat" type="text" readonly="true" size="35" value= "<?php echo $fila2['apepat']; ?>"> 
</span></td> 
</tr> 
<tr> 
<td>Apellido Materno </td> 
<td><span class="Estilo3"> 
<input name="apemat" type="text" readonly="true" size="35" value = "<?php echo $fila2['apemat']; ?>"> 
</span></td> 
</tr> 
<tr> 
<td>DNI</td> 
<td><span class="Estilo3"> 
<input name="dni" type="text" size="8" value= "<?php echo $fila2['dni']; ?>"> 
</span></td> 
</tr> 
<tr> 
<td>Telefonos:</td> 
<td><span class="Estilo3"> 
<input name="telefo" type="text" id="telefono" size="35" value = "<?php echo $fila2['telefo']; ?>"> 
</span></td> 
</tr> 
<tr> 
<td>Direccion</td> 
<td><span class="Estilo3"> 
<input name="dire" type="text" id="direccion" size="50" value = "<?php echo $fila2['dire']; ?>"> 
</span></td> 
</tr> 
<tr> 
<td>Cuidad</td> 
<td><span class="Estilo3"> 
<input name="cuidad" type="text" size="30" value = "<?php echo $fila2['cuidad']; ?>"> 
</span></td> 
</tr> 
<tr> 
<td>Provincia</td> 
<td><span class="Estilo3"> 
<input name="provin" type="text" id="provincia" size="30" value = "<?php echo $fila2['provin']; ?>"> 
</span></td> 
</tr> 
<tr> 
<td>Departamento:</td> 
<td><span class="Estilo3"> 
<input name="depa" type="text" id="departamento" size="30" value = "<?php echo $fila2['depa']; ?>"> 
</span></td> 
</tr> 
<tr> 
<td colspan="2">De la instiucion</td> 
</tr> 
<tr> 
<td>Instituxcion Proveniente </td> 
<td><span class="Estilo3"> 
<input name="insti" type="text" id="institucion" size="50" value = "<?php echo $fila2['insti']; ?>"> 
</span></td> 
</tr> 
<tr> 
<td>Cargo</td> 
<td><span class="Estilo3"> 
<input name="cargo" type="text" id="cargo" size="50" value = "<?php echo $fila2['cargo']; ?>"> 
</span></td> 
</tr> 
<tr> 
<td>Otro</td> 
<td>&nbsp;</td> 
</tr> 
<tr> 
<td>Como se entero </td> 
<td><span class="Estilo3"> 
<input name="como" type="text" id="como" size="50" value = "<?php echo $fila2['como']; ?>"> 
</span></td> 
</tr> 
<tr> 
<td><input type = "submit" name = "submit" value = "Actualizar"></td>
</tr>
</table>
</div>
</form>
<?php
mysql_free_result 
$result2 );
}
?>
__________________
http://about.me/jemano
  #15 (permalink)  
Antiguo 02/10/2006, 09:09
Avatar de Erikfrancisco  
Fecha de Ingreso: noviembre-2003
Ubicación: Estado de México
Mensajes: 503
Antigüedad: 20 años, 5 meses
Puntos: 4
Bueno despues de que me diste la estructura de tu tabla creo que ahora sí nos sintonizamos en el mismo canal ya hice las pruebas y ya funciona bueno eso es lo que creo checalo y modificalo para que se vea más bonito ¿no? aquí esta el código:

Código PHP:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 
<html> 
<head> 
<title>Documento sin t&iacute;tulo</title> 
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> 
<style type="text/css"> 
<!-- 
.Estilo3 {color: #FF0000} 
--> 
</style> 
</head> 
<body> 

<?php
$db mysql_connect'localhost''''' ) or die ( "Unable to connect to MySQL server." ); 
$datos mysql_select_db 'proyectodb'$db ); 

if ( isset ( 
$_POST['submit'] ) )
{
$consulta "UPDATE usuario SET ";
$consulta .= "codver = '".$_POST['codver']."',";
$consulta .= "email = '".$_POST['email']."',";
$consulta .= "sexo = '".$_POST['sexo']."',";
$consulta .= "nombre = '".$_POST['nombre']."',";
$consulta .= "apepat = '".$_POST['apepat']."',";
$consulta .= "apemat = '".$_POST['apemat']."',";
$consulta .= "dni = '".$_POST['dni']."',";
$consulta .= "telefo = '".$_POST['telefo']."',";
$consulta .= "dire = '".$_POST['dire']."',";
$consulta .= "cuidad = '".$_POST['cuidad']."',";
$consulta .= "provin = '".$_POST['provin']."',";
$consulta .= "depa = '".$_POST['depa']."',";
$consulta .= "insti = '".$_POST['insti']."',";
$consulta .= "cargo = '".$_POST['cargo']."',";
$consulta .= "como = '".$_POST['como']."'";
$consulta .= " WHERE codmod = '".$_POST['codmod']."'";
$result mysql_query $consulta );

$consulta3 "SELECT * FROM usuario WHERE codmod = '".$_POST['codmod']."'";
$result3 mysql_query $consulta3 );
$fila mysql_fetch_array $result3 );

echo 
"El registro fue actualizado y ahora contiene los siguientes datos:<br/>";
echo 
"<input type = 'text' name = 'usuario' value = '".$fila['usuario']."'><br/>";
echo 
"<input type = 'text' name = 'codver' value = '".$fila['codver']."'><br/>";
echo 
"<input type = 'text' name = 'email' value = '".$fila['email']."'><br/>";
echo 
"<input type = 'text' name = 'sexo' value = '".$fila['sexo']."'><br/>";
echo 
"<input type = 'text' name = 'nombre' value = '".$fila['nombre']."'><br/>";
echo 
"<input type = 'text' name = 'apepat' value = '".$fila['apepat']."'><br/>";
echo 
"<input type = 'text' name = 'apemat' value = '".$fila['apemat']."'><br/>";
echo 
"<input type = 'text' name = 'dni' value = '".$fila['dni']."'><br/>";
echo 
"<input type = 'text' name = 'telefo' value = '".$fila['telefo']."'><br/>";
echo 
"<input type = 'text' name = 'dire' value = '".$fila['dire']."'><br/>";
echo 
"<input type = 'text' name = 'cuidad' value = '".$fila['cuidad']."'><br/>";
echo 
"<input type = 'text' name = 'provin' value = '".$fila['provin']."'><br/>";
echo 
"<input type = 'text' name = 'depa' value = '".$fila['depa']."'><br/>";
echo 
"<input type = 'text' name = 'insti' value = '".$fila['insti']."'><br/>";
echo 
"<input type = 'text' name = 'cargo' value = '".$fila['cargo']."'><br/>";
echo 
"<input type = 'text' name = 'como' value = '".$fila['como']."'>";

mysql_free_result $result3 );
}

else
{
$usuario "Admin";
$consulta2 "SELECT * FROM usuario WHERE usuario = '".$usuario."'"
$result2 mysql_query $consulta2$db ) or die ( header ("No se pudo realizar la consulta" ) );
$fila2 mysql_fetch_array $result2 );
?>
<form name = "formu" action = "<?php $_SERVER['PHP_SELF']; ?>" method="post" > 
<div align="center"> 
<table border="1">
<tr> 
<td width="201">Cod Ver </td> 
<td><input name="codver" type="text" readonly="true" value= "<?php echo $fila2['codver']; ?>">
                   <input name="codmod" type="hidden" readonly="true" value= "<?php echo $fila2['codmod']; ?>"></td> 
</tr> 
<tr> 
<td>Email</td> 
<td><span class="Estilo3"> 
<input name="email" type="text" size="50" value= "<?php echo $fila2['email']; ?>"></span>
</td> 
</tr> 
<tr> 
<td>Sexo</td> 
<td><label> 
<input name="sexo" type="radio" value = "hombre" <?php if ( $fila2['sexo'] == 'hombre' ) echo "checked"?>
Hombre</label> 
<input name="sexo" type="radio" value = "mujer" <?php if ( $fila2['sexo'] == 'mujer' ) echo "checked"?>
Mujer</td> 
</tr> 
<tr> 
<td>Nombres</td> 
<td><span class="Estilo3"> 
<input name="nombre" type="text" id="nombre" readonly="true" size="50" value= "<?php echo $fila2['nombre']; ?>" > 
</span></td> 
</tr> 
<tr> 
<td>Apellido Parterno </td> 
<td><span class="Estilo3"> 
<input name="apepat" type="text" readonly="true" size="35" value= "<?php echo $fila2['apepat']; ?>"> 
</span></td> 
</tr> 
<tr> 
<td>Apellido Materno </td> 
<td><span class="Estilo3"> 
<input name="apemat" type="text" readonly="true" size="35" value = "<?php echo $fila2['apemat']; ?>"> 
</span></td> 
</tr> 
<tr> 
<td>DNI</td> 
<td><span class="Estilo3"> 
<input name="dni" type="text" size="8" value= "<?php echo $fila2['dni']; ?>"> 
</span></td> 
</tr> 
<tr> 
<td>Telefonos:</td> 
<td><span class="Estilo3"> 
<input name="telefo" type="text" id="telefono" size="35" value = "<?php echo $fila2['telefo']; ?>"> 
</span></td> 
</tr> 
<tr> 
<td>Direccion</td> 
<td><span class="Estilo3"> 
<input name="dire" type="text" id="direccion" size="50" value = "<?php echo $fila2['dire']; ?>"> 
</span></td> 
</tr> 
<tr> 
<td>Cuidad</td> 
<td><span class="Estilo3"> 
<input name="cuidad" type="text" size="30" value = "<?php echo $fila2['cuidad']; ?>"> 
</span></td> 
</tr> 
<tr> 
<td>Provincia</td> 
<td><span class="Estilo3"> 
<input name="provin" type="text" id="provincia" size="30" value = "<?php echo $fila2['provin']; ?>"> 
</span></td> 
</tr> 
<tr> 
<td>Departamento:</td> 
<td><span class="Estilo3"> 
<input name="depa" type="text" id="departamento" size="30" value = "<?php echo $fila2['depa']; ?>"> 
</span></td> 
</tr> 
<tr> 
<td colspan="2">De la institucion</td> 
</tr> 
<tr> 
<td>Instituxcion Proveniente </td> 
<td><span class="Estilo3"> 
<input name="insti" type="text" id="institucion" size="50" value = "<?php echo $fila2['insti']; ?>"> 
</span></td> 
</tr> 
<tr> 
<td>Cargo</td> 
<td><span class="Estilo3"> 
<input name="cargo" type="text" id="cargo" size="50" value = "<?php echo $fila2['cargo']; ?>"> 
</span></td> 
</tr> 
<tr> 
<td>Otro</td> 
<td>&nbsp;</td> 
</tr> 
<tr> 
<td>Como se entero </td> 
<td><span class="Estilo3"> 
<input name="como" type="text" id="como" size="50" value = "<?php echo $fila2['como']; ?>"> 
</span></td> 
</tr> 
<tr> 
<td colspan="2" align = "right"><input type = "submit" name = "submit" value = "Actualizar"></td>
</tr>
</table>
</div>
</form>
<?php
mysql_free_result 
$result2 );
}
?>
Suerte

Última edición por Cluster; 02/10/2006 a las 09:17
  #16 (permalink)  
Antiguo 02/10/2006, 09:17
O_O
 
Fecha de Ingreso: enero-2002
Ubicación: Santiago - Chile
Mensajes: 34.417
Antigüedad: 22 años, 3 meses
Puntos: 129
Erikfrancisco

Please, usa el botón "PHP" para que el código quede entras las etiquetas [ php] y [/ php] .. así queda coloreado como la muestra que ves en tu mensaje anterior (que lo edité yo).

Un saludo,
__________________
Por motivos personales ya no puedo estar con Uds. Fue grato haber compartido todos estos años. Igualmente los seguiré leyendo.
  #17 (permalink)  
Antiguo 02/10/2006, 09:21
Avatar de Erikfrancisco  
Fecha de Ingreso: noviembre-2003
Ubicación: Estado de México
Mensajes: 503
Antigüedad: 20 años, 5 meses
Puntos: 4
Ok Cluster no hayaba el modo de hacerlo. gracias
  #18 (permalink)  
Antiguo 02/10/2006, 09:57
Avatar de Nova  
Fecha de Ingreso: enero-2003
Ubicación: Hyo
Mensajes: 832
Antigüedad: 21 años, 3 meses
Puntos: 1
k mas puedo decir
__________________
http://about.me/jemano
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 02:37.