[Solved] Help with Parse Error, unexpected T_VARIABLE
Posted: Mon Mar 22, 2004 10:40 am
Here is my code:
Im getting the below error:
Parse error: parse error, unexpected T_VARIABLE on line 37
Line 37 is the line below:
Any Ideas?
Code: Select all
<?php
$db_name = "testDB";
$table_name = "my_music";
$connection = @mysql_connect("localhost", "byron", "byronb") or die(mysql_error());
$db = @mysql_select_db($db_name, $connection) or die(mysql_error());
$sql = "SELECT id, format, title, artist_fn, artist_ln, rec_label,
my_notes, date_acq FROM $table_name ORDER BY id";
$result = @mysql_query($sql, $connection) or die(mysql_error());
while ($row = mysql_fetch_array($result)) {
$id = $row['id'];
$format = $row['format'];
$title = stripslashes($row['title']);
$artist_fn = stripslashes($row['artist_fn']);
$artist_ln = stripslashes($row['artist_ln']);
$rec_label = stripslashes($row['rec_label']);
$my_notes = stripslashes($row['my_notes']);
$date_acq = $row['date_acq'];
if ($artist_fn != "") {
$artist_fullname = trim("$artist_fn $artist_ln");
} else {
$artist_fullname = trim("$artist_ln");
}
if ($date_acq == "0000-00-00") {
$date_acq = "[unknown]";
}
$display_block .= "
<P><strong>$title</strong> ($artist_fullname) <br>
$my_notes <em> (acquired: $date_acq, format: $format)</em></p>;
}
?>
<html>
<head>
<title>My Music (Ordered by ID)</title>
</head>
<body>
<h1>My Music: Ordered by ID</h1>
<? echo "$display_block"; ?>
<p><a href="my_menu.html">Return to Menu</a></p>
</body>
</html>Parse error: parse error, unexpected T_VARIABLE on line 37
Line 37 is the line below:
Code: Select all
<? echo "$display_block"; ?>