Posted by:
nav2626
(---.nycmny.east.verizon.net)
hi..steven here's my full code....actually i have made two pages one is html( the interface) u can say which post its method on the second page insert. and the error is in insert page here's the code for that page..
thanks a lot..
<html>
<head>
<title>insert.php</title>
</head>
<body>
<?php
$con = mysql_connect("localhost","root","managed1"
;
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("minhas", $con);
$username = $_POST['username'];
$password = $_POST['password'];
$sql=mysql_query("INSERT INTO customer (username, password) VALUES ('$username','$password')"
;
if (!mysql_query($sql,$con))
{
die('Error: ' . mysql_error());
}
echo "1 record added";
mysql_close($con)
?>
</body>
</html>