Hi,
This script is outputting a parse error on line 104 which is the very last line of the script.
<?
include "../config.php";
include ($home_dir."header.php");
include ($home_dir."db.php");
/////////// GET ARTIST INFO
// Retrieve artist name from another page via $_POST
$artist = $_GET['artist'];
$sql = "SELECT * FROM `users` WHERE `artist` = '$artist' LIMIT 1";
$result = mysql_query($sql);
// Report Db errors
if (!$result) {
echo "Could not successfully run query ($sql) from DB: " . mysql_error();
exit;
}
// Report Nothing Found
if (mysql_num_rows($result) == 0) {
echo "Could not find ".stripslashes($artist)."!";
}
$artist_name = "".stripslashes($artist)."";
$artist_description = "";
while ($row = mysql_fetch_array($result))
{
//If CD's are availble print a list of CDs
if ($row['artist'] == NULL) { echo "<br>Page Unavailable";
}
else {
$artist_description .=''.stripslashes($row['artist_description']).'';
}
}
/////////// GET CD INFO ////////
$sql = "SELECT * FROM `cds` WHERE `artist` = '$artist' LIMIT 1";
$result = mysql_query($sql);
// Report Db errors
if (!$result) {
echo "Could not successfully run query ($sql) from DB: " . mysql_error();
exit;
}
// Report Nothing Found
if (mysql_num_rows($result) == 0) {
echo "Could not find any CD's by ".stripslashes($artist)."!";
$cd_image ="";
while ($row = mysql_fetch_array($result))
{
//If CD's are availble print a list of CDs
if ($row['cd_title'] == NULL) { echo "No CD's Available";
}
else {
$cd_image .='<img src="/artists/images/'.stripslashes($row['artist']).'_'.stripslashes($row['cd_title']).'_fc.jpg" >';
}
}
//include template class
include ("/templates/ultratemplate.php");
$oTemplate = new UltraTemplate();
//template for this script
$oTemplate->load($home_dir."/templates/artist.php");
//define template variables
$oTemplate->tag("artist","$artist_name");
$oTemplate->tag("artist_description","$artist_description");
$oTemplate->tag("cd_image","$cd_image");
$oTemplate->display();
//close the DB conntection
mysql_free_result($result);
mysql_close($conn);
?>