hi everyone,
I'm getting this error message from my script
"Parse error: syntax error, unexpected T_VARIABLE in C:\Program Files\Apache Group\Apache2\htdocs\sel_byid.php on line 18".
I have no Idea what this is or more importantly what it is trying to tell me to fix. I just started working with PHP, MYSQL, and APACHE. Here is my script, and thank you for your help.
<?
$db_name = "testdb2";
$table_name = "my_music";
$connection = @mysql_connect("localhost", "xxxxx", "xxxxx")
or die(mysql_error());
$db = @mysql_select_db($db_name, $connection) or die(mysql_error());
$sql = "SELECT * 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> on $rec_label,
by $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>