Hi again .I've a problem with this code
<?
$dbHost = "localhost";
$dbUser = "dawn";
$dbPass = "dawn";
$dbName = "news";
$table = "newstable";
$connect = @mysql_connect ($dbHost, $dbUser, $dbPass);
if (!$connect)
{
echo "result".urlencode("Error Cannot connect to SQL Server");
exit;
}
if (!@mysql_select_db ($dbName))
{
echo "result=".urlencode("Error Cannot Select DATABASE");
};
$result = mysql_query("INSERT INTO newstable (headline, body) VALUES ({$POST['addnewsheadline']},{$POST['addnewsbody']})");
if ($result)
{
print "result=success!";}
mysql_close($connect);
?>
ERrror: PHP Notice: Undefined index: addnewsheadline in C:\Inetpub\wwwroot\php\addnews.php on line 17 PHP Notice: Undefined index: addnewsbody in C:\Inetpub\wwwroot\php\addnews.php on line 17
I think the error is resulted from $_POST varible.ANd I do NOT know how to fix this.
Help.
THanks.