Ver Mensaje Individual
  #1 (permalink)  
Antiguo 07/01/2011, 07:47
elw
 
Fecha de Ingreso: enero-2011
Mensajes: 16
Antigüedad: 13 años, 4 meses
Puntos: 0
Pregunta Problema con sistema de usuarios

Hola, he creado un sistema de usuarios, pero no me funciona; está basado en el de otra web, cuando la encuentre pondré el link:

archivo registro.html
<!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>Documento sin tÃ*tulo</title>
</head>

<body>
<form id="form1" name="form1" method="post" action="insertar.php">
<p>Username:</p>
<p>
<label for="username"></label>
<input type="text" name="username" id="username" />
</p>
<p>Password:</p>
<p>
<label for="password"></label>
<input type="password" name="password" id="password" />
</p>
<p>Nombre:</p>
<p>
<label for="nombre"></label>
<input type="text" name="nombre" id="nombre" />
</p>
<p>Apellidos:</p>
<p>
<label for="apellidos"></label>
<input type="text" name="apellidos" id="apellidos" />
</p>
<p>Email:</p>
<p>
<label for="email"></label>
<input type="text" name="email" id="email" />
</p>
<p>
<input type="submit" name="button" id="button" value="Enviar Formulario" />
</p>
</form>
</body>
</html>

archivo insertar.php
<?php

if(isset ($_POST['username']) && !empty($_POST['username'])

isset ($_POST['password']) && !empty($_POST['password'])
(isset ($_POST['nombre']) && !empty($_POST['nombre'])
(isset ($_POST['apellidos']) && !empty($_POST['apellidos'])
(isset ($_POST['email']) && !empty($_POST['email'])

$link = mysql_connect("localhost", "jorgito61", "lopez",
mysql_select_db("users", $link);
mysql_query("INSERT INTO usuarios (username,password,nombre,apellidos,emiail);
VALUES ('{$_POST['username']}'.('{$_POST['password']}'('{$_POST['nombre']}'('{$_POST['apellidos']}'('{$_POST['email']}'
$my_error = mysql_error ($link);
if(!empty($my_error)) {
echo "ha habido un error al insertar los datos del usuario"
} else {
echo "Los datos han sido introducidos satisfactoriamente"
}
} else {

echo ·Error, no ha introducido todos los datos";
}

?>

la base de datos y la tabla ya estan creados y creo que se llaman "users" usuarios, respectivamente.

cuando pruebo de registrarme me da error 404 "no encontrado", por qué?
aunque los campos esten vacios si le doy a enviar formulario me da error 404, sin decirme que "el campo x está vacío.
Gracias de antemano