Ver Mensaje Individual
  #1 (permalink)  
Antiguo 24/12/2009, 16:49
Avatar de rodrigo791
rodrigo791
 
Fecha de Ingreso: noviembre-2009
Ubicación: Uruguay
Mensajes: 1.339
Antigüedad: 15 años, 2 meses
Puntos: 168
De acuerdo error: Unknown column 'pass' in 'field list'

hola amigos, tengo el siguiente error al intentar insertar datos en una tabla de una base de datos: Unknown column 'pass' in 'field list'

el codigo completo del .php es:

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" lang="es" xml:lang="es">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>Xgames-Prueba</title>
</head>
<body>


<?php
$host
="localhost";
$user="root";
$password="";
$link mysql_connect ($host$user$password) or die ("No se puede conectar con la base de datos");

    
mysql_select_db("usuarios",$link); 

    
mysql_query("INSERT INTO datos (nombre,pass,email) 
    VALUES ('{$_POST['nombre']}','{$_POST['pass']}','{$_POST['email']}')"
,$link); 

    
$my_error mysql_error($link); 

    if(!empty(
$my_error)) { 
    echo 
"Ha habido un error al insertar los valores. $my_error"
    } 
else{
echo 
"El ingreso fue un exito"
}
?>
<div align="center">
Formulario de <strong>registro</strong><br />
<form action="prueba.php" method="post"><br />
Nombre:<input type="text" name="nombre" maxlength="20"/> <br />
Email:<input type="text" name="email" maxlength="20"/><br />
Contraseña:<input type="text" name="pass" maxlength="20"/><br />
<input type="submit" name="enviar" value="Registro"/>
</form>
</div>

</body>
</html>
gracias espero q puedan ayudarme..