Page 1 of 1

Syntax Error Help Needed

Posted: Mon Mar 08, 2010 6:44 am
by Jay87
I get this error:

PHP Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /var/www/helpdesk-dev/edit_priority.php on line 11

on this line:

Code: Select all

If ($_POST) {mssql_query("UPDATE faultlog SET enduser='" . $_POST['user'] . "', description='" . $_POST['desc'] "', priority='" . $_POST['pri'] . "', chargable='" . $_POST['charge'] . "' WHERE faultlog.id_prefix='" . $_GET['pfx'] . "' AND faultlog.id=" . $_GET['id'],$db)};
I can't see the syntax error :banghead:

Help?

Re: Syntax Error Help Needed

Posted: Mon Mar 08, 2010 6:50 am
by requinix
Jay87 wrote:I can't see the syntax error
Look harder: you're missing a .

Re: Syntax Error Help Needed

Posted: Mon Mar 08, 2010 6:53 am
by Jay87
can you tell me where please?

i've been staring at this code all morning and its making me :crazy:

Re: Syntax Error Help Needed

Posted: Mon Mar 08, 2010 6:57 am
by Jay87
Oh ok think i spotted it:

Code: Select all

If ($_POST) {mssql_query("UPDATE faultlog SET enduser='" . $_POST['user'] . "', description='" . $_POST['desc'] . "', priority='" . $_POST['pri'] . "', chargable='" . $_POST['charge'] . "' WHERE faultlog.id_prefix='" . $_GET['pfx'] . "' AND faultlog.id=" . $_GET['id'],$db)};
but now i get: syntax error, unexpected '}' in /var/www/helpdesk-dev/edit_priority.php on line 11

should the } not be after the database reference?