Hi
This works perfectly on my wampserver:
if(isset($_POST["name"]) && isset($_POST["pass"]) && isset($_POST["email"]))
{
$name=$_POST["name"];
$pass=$_POST["pass"];
$email=$_POST["email"];
$con=mysql_connect('localhost','user1','11424028');
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("rand", $con);
$sql = "INSERT INTO `members` (username,password,email) VALUES ('" . $name . "','" . $pass . "','" . $email . "')";
$query = mysql_query($sql,$con) or die('Error: ' . mysql_error());
}
?>
<html>
<body>
<form method="post">
Username: <input type="text" name="name" /></br>
Password: <input type="password" name="pass" /></br>
Email: <input type="text" name="email" width=40 /></br>
<input type="submit" />
</form>
</body>
</html>
The form action was redirecting the page before the mysql statement was sent,
So i simply just took it out
If this doesnt work, i would suggest going over your database and making sure the fields and table names are exactly right
anyway, hope the above works m8.
Reece