Syntax Error Help Needed

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Jay87
Forum Commoner
Posts: 61
Joined: Thu Jan 07, 2010 5:22 am

Syntax Error Help Needed

Post 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?
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Syntax Error Help Needed

Post by requinix »

Jay87 wrote:I can't see the syntax error
Look harder: you're missing a .
Jay87
Forum Commoner
Posts: 61
Joined: Thu Jan 07, 2010 5:22 am

Re: Syntax Error Help Needed

Post by Jay87 »

can you tell me where please?

i've been staring at this code all morning and its making me :crazy:
Jay87
Forum Commoner
Posts: 61
Joined: Thu Jan 07, 2010 5:22 am

Re: Syntax Error Help Needed

Post 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?
Post Reply