Ver Mensaje Individual
  #11 (permalink)  
Antiguo 28/02/2011, 11:07
emanuelargentina
 
Fecha de Ingreso: octubre-2010
Mensajes: 21
Antigüedad: 13 años, 7 meses
Puntos: 0
Respuesta: Dreamweaver consulta de usuario a tabla de BD

Hola Miguel, Buenas tardes
ante todo mil gracias todas las explicaciones,
aun no lo he logrado

abajo copio el codigo de la pagina
vas a ver un juego de registros llamado hernan, y esta creado a una tabla llamada nombres.
tambien veras un formulario y un boton del tipo submit

si ves donde esta el error te pido por favor me avises.
saludos y disculpa las molestias



<?php require_once('Connections/Dattatec.php'); ?>
<?php
$colname_hernan = "-1";
if (isset($_POST[''])) {
$colname_hernan = (get_magic_quotes_gpc()) ? $_POST[''] : addslashes($_POST['']);
}
mysql_select_db($database_Dattatec, $Dattatec);
$query_hernan = sprintf("SELECT * FROM nombres WHERE nombres = '%s'", $colname_hernan);
$hernan = mysql_query($query_hernan, $Dattatec) or die(mysql_error());
$row_hernan = mysql_fetch_assoc($hernan);
$totalRows_hernan = mysql_num_rows($hernan);
?><!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=iso-8859-1" />
<title>Documento sin t&iacute;tulo</title>
</head>

<body>
<form id="form1" name="form1" method="post" action="">
<p>
<label>descripcion
<input type="text" name="textfield" />
</label>
</p>
<p>
<label>
<input type="submit" name="Submit" value="Enviar" />
</label>
<?php echo $row_hernan['nombres']; ?></p>
</form>
<p></p>
<p>&nbsp;</p>
</body>
</html>
<?php
mysql_free_result($hernan);
?>