Insert.php won't work?

Britt babe xxx

New member
I'm currently using this code:

<html>
<body>

<form action="insert.php" method="post">
Name: <input type="text" name="name:" />
E-mail: <input type="text" name="e-mail:" />
Comments: <input type="text" name="comments:" />
<input type="submit" />
</form>

</body>
</html>


<?php
$con = mysql_connect("localhost","username","password");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}

mysql_select_db("my_db", $con);

$sql="INSERT INTO Users (Name:, E-mail:, Comments:)
VALUES
('$_POST[Name:]','$_POST[E-mail:]','$_POST[Comments:]')";

if (!mysql_query($sql,$con))
{
die('Error: ' . mysql_error());
}
echo "1 record added";

mysql_close($con)
?>

But whenever I try to submit a comment, I get error: can't find mysite.com/insert.php!

So I went into my php folder and created insert.php but still no dice.

What's wrong?
Do I have to make a directory?
 
Back
Top