{this is my code when i enter info into the form fields and press submit the info does not get inserted into my database }
<?php
//connect to server and select database
$con = mysql_connect("localhost", "***", "***",);
if(!$con)
{
die ('Could not connect: ' . mysql_error());
mysql_select_db("registration", $con);
//retrieve posted info.
$username = $_POST['username'];
$password = $_POST['password'];
$email = $_POST['email'];
//insert into database.
$sql = "INSERT INTO newusers SET username='$username' ,
password='$password' , email='$email' ";
//display message.
if (!mysql_query($sql,$con) )
{
die('ERROR:' . mysql_error() );
}
echo "Info successfully added!";
mysql_close($con)
?>
<html>
<body>
<!-- Tutorial Description: PHP Forms -->
<form action="form_success.php" method="post">
username: <input type="text" name="username" /><br>
password: <input type="text" name="password" /><br>
email: <input type="text" name="email" /><br>
<input type="submit" value="login" />
</form>
</body>
</html>