PHP Parse error - unexpected T_STRING

Hello everyone,
I am a little new to PHP, been doing it for only about a year now.

I am having a problem with my code, and I dont know how to solve it…
Here it is:
[php]

<?php mysql_select_db("blog_database"); //the problem is on the next line if(!empty($_REQUEST['id'])) { $titleid = $_REQUEST['id']; $query = mysql_query("SELECT * FROM blog_database WHERE id = '$titleid'"); while ($row = mysql_fetch_array($query)) { $name = $row['name']; } print "Blog: $name"; }elseif ($_REQUEST['action'] == "new"){ print "Blog: new"; }else{ print "Blog"; } ?> [/php]

PHP Parse error - unexpected T_STRING

at line …?

I think the syntax of this code are correct, but is all code of file? or only a part?

I have indicated the line with a comment… its the second line from the beginning…

It is only a part of the file, but before it is the html tags… , etc…

before this code must be a ’ character that will not be closed.

Nope… that doesnt seem to be the problem… :frowning:

Hey…
I figured out the problem… it was as you said… there was a ’ mark somewhere in the code, so small it was unnoticeable…

Thanks by the way…

Sponsor our Newsletter | Privacy Policy | Terms of Service