# Php newb..mysql form question

**URL:** <https://forum.kirupa.com/t/php-newb-mysql-form-question/206871>\
**Category:** Uncategorized\
**Created:** [November 12, 2006, 4:43pm UTC](https://forum.kirupa.com/t/php-newb-mysql-form-question/206871 "2006-11-12T16:43:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlexGM16](https://avatars.discourse-cdn.com/v4/letter/a/e8c25b/32.png) [@AlexGM16](https://forum.kirupa.com/u/AlexGM16)\
**Post date:** [November 12, 2006, 4:43pm UTC](https://forum.kirupa.com/t/php-newb-mysql-form-question/206871/1 "2006-11-12T16:43:04Z")

</div>

i get this error when i run the following script \*\*addnews.php:  
\*\*

```auto

**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:

```auto
<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:)
