I am getting the following error message:
Notice: Undefined variable: headline in e:\inetpub\wwwroot\news\news.php on line 5
Notice: Undefined variable: text in e:\inetpub\wwwroot\news\news.php on line 5
Notice: Undefined variable: link in e:\inetpub\wwwroot\news\news.php on line 5
and the code that I am using is:
<html>
<body>
<?php $db = mysql_connect("localhost", "user", "password");
mysql_select_db("mysql",$db);
$sql = "INSERT INTO news (headline, text, link) VALUES ('$headline','$text','$link')";
$result = mysql_query($sql);
echo "Thank you! Information entered.\n";
?>
<form method="post" action="<?php echo $PHP_SELF?>">
Headline:<input type="Text" name="headline"><br>
Text:<input type="Text" name="text"><br>
Link:<input type="Text" name="link"><br>
<input type="Submit" name="submit" value="Enter information">
</form>
</body>
</html>
what am I doing wrong?
Thanks
Tim