i get this error when i run the following script **addnews.php:
**
**Parse error**: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in **c:\apache\htdocs\phpsite\addnews.php** on line **14**
My table news consists of id, postdate, title, newstext
Heres my code for the script:
<form name="toSave" method="post"
action="<?=$_SERVER['PHP_SELF']?>">
<input type="text" name="title" size="20" /><br>
<input type="text" name="newstext" size="20" />
<input type="submit" name="submit" value="submit" />
</form>
<?php
$db=mysql_connect("localhost", "username", "pass") or die("Could not connect to localhost."); mysql_select_db("alex", $db) or die("Could not find database alex");
$querySQL = "insert into news (postdate, title,
newstext) values (CURDATE(), $_POST['title'], $_POST['newstext'])";
if(!$querySQL) error_message(sql_error());
?>
i cant figure out the problem and I am fairly news to all of this…please help:)