Hi,
I\'m new to mysql and php but I\'m trying to create a music database for my site. I pass the variable \'id\' through the url. Basically I just want to display the songs and times that have the same id as the variable i pass from the previous page. I\'m not sure exactly what\'s wrong but I get a Parse error: parse error, unexpected T_STRING, expecting \',\' or \';\' error message.
<?php
$location = "xxx";
$username = "xxx";
$password = "xxx";
$database = "xxx";
$conn = mysql_connect("$location","$username","$password");
if (!$conn) die ("Could not connect MySQL");
mysql_select_db($database,$conn) or die ("Could not open database");
echo "<table width=200 border=0 cellpadding=4 cellspacing=0> <tr> <td width=100><p><b>Song</b></p></td> <td><p><b>Length</b></p></td> </tr>;
$sql_events = mysql_query("SELECT * FROM `r-setlist` WHERE id = $id ");
while ($row = mysql_fetch_array($sql_events)) {
$song = $row["song"];
$length = $row["length"];
echo "<tr> <td width=100 nowrap><p>$song</p></td> <td nowrap><td nowrap><p>$length</p></td> </tr>";
$row_count++;
}
echo "</table>";
?>
Thanks