ok i'm just trying to learn how to have the info submitted from a form written to an mySQL databse. i don't to make the user have to log on or anything in order to submit something to the form. i've pasted the code i'm using below. my problem is when i test it, i get the message: FORBIDEN: you don't have permission to access /> on this server. what am i missing?
<?php
if ($submit){
// process form
$db = mysql_connect("localhost", "", "");
mysql_select_db("test2", $db);
$sql = "INSERT INTO message (message) values ('$message')";
$result = mysql_query($sql);
while (list($name, $value) = each($HTTP_POST_VARS)){
echo "Thank You! Infomation entered.\n";
}
}else{
//display form
?>
<form method="post" action="<?php echo $PHP_SELF?>">
<textarea rows=10 cols=30 name="message">
Please write your message here
</textarea> <br>
<input type="submit" name="submit" value="submit">
</form>
<?php
}//end if
</body>
</html>