Hola,
¿Donde está el problema? O sea, ¿que problema te aparece?
Código PHP:
Ver original<html>
<head>
</head>
<body>
<?php
function registrarse(){
$email = $_POST["email"];
$nick = $_POST["nick"];
$pass = $_POST["pass"];
$query= "insert into usuarios (ID_USER,EMAIL,NICK,PASS) values (null,'".$email."','".$name."','".$pass."')";
echo '<p>Registrado correctamente</p>';
}else{
echo '<p style="color: red" >Error al registrar</p>';
}
}
?>
<form method="post" action="formulario.php">
Inserta tus datos: <br>
<table style= "border: 0">
<td>Nombre</td>
<td><input name="name" size="20" maxlength="30" id="name"></td><tr>
<td>email</td>
<td><input name="pass" size="30" maxlength="50" id="email"></td><tr>
<td>pass</td>
<td><input name="email" size="30" maxlength="50" id="pass"></td><tr>
</table>
<p style="text-align: center"><input type="submit" onclick="registrarse()" value="aceptar"><input type="reset" value="Reiniciar formulario">
</form>
</body>
</html>
Fijate si te funciona así,
Suerte.