Ver Mensaje Individual
  #1 (permalink)  
Antiguo 29/09/2006, 09:34
Avatar de Nova
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