Parse error:

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
samjesse
Forum Newbie
Posts: 2
Joined: Mon Jun 15, 2009 8:05 pm

Parse error:

Post by samjesse »

Hi

I am getting Parse error from the following code

<?php
...
$query = "UPDATE pages SET
menu_name = '{$menu_name}',
position = {$position},
visible = {$visible},
content = '{$content}'
WHERE subject_id = {$_GET['subj']};
echo "<p>" . $query . "</p>"; <<<<<<< this line.

...
?>

thanks for helping
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Parse error:

Post by requinix »

Let's see what would have happened if you had used

Code: Select all

tags in your post:

Code: Select all

$query = "UPDATE pages SET
menu_name = '{$menu_name}',
position = {$position},
visible = {$visible},
content = '{$content}'
WHERE subject_id = {$_GET['subj']};
echo "<p>" . $query . "</p>";
User avatar
papa
Forum Regular
Posts: 958
Joined: Wed Aug 27, 2008 3:36 am
Location: Sweden/Sthlm

Re: Parse error:

Post by papa »

Code: Select all

$query = "UPDATE pages SET
 menu_name = '{$menu_name}',
 position = {$position},
 visible = {$visible},
 content = '{$content}'
 WHERE subject_id = {$_GET['subj']}";
echo "<p>$query</p>";
 
Post Reply