php code showing instead of track names
-
Hi,
After importing my track list, the page shows the alphabet fine, and the artist names no problem, but when I expand one of the artist sections to show the tracks, instead of seeing the track names, I see some php code.
e.g.
[+] Guns N’ Roses
prefix . “tracks where artist = ‘”.mysql_real_escape_string(stripslashes($itemData)).”‘ and (artist = albumartist or albumartist is NULL) order by album”; //print $querystr; $tracks = $wpdb->get_results($querystr); foreach($tracks as $track){ echo “
“.$track->album.”
“; } } if($pre == ‘albumartist’){ $querystr = “SELECT distinct album FROM ” . $wpdb->prefix . “tracks where albumartist = ‘”.mysql_real_escape_string(stripslashes($itemData)).”‘ order by album”; //print $querystr; $tracks = $wpdb->get_results($querystr); foreach($tracks as $track){ echo “
“.$track->album.”
“; } } if($pre == ‘album’){ $querystr = “SELECT title, tracknum FROM ” . $wpdb->prefix . “tracks where artist= ‘”.mysql_real_escape_string(stripslashes($itemData)).”‘ and album = ‘”.mysql_real_escape_string(stripslashes($itemData2)).”‘ order by tracknum”; //print $querystr; $tracks = $wpdb->get_results($querystr); foreach($tracks as $track){ if(isset($track->tracknum)){ echo “
“.$track->tracknum.” – “.$track->title.”
“; }else{ echo “
“.$track->title.”
“; } } } if($pre == ‘albumvarious’){ $querystr = “SELECT title, tracknum, artist FROM ” . $wpdb->prefix . “tracks where albumartist= ‘”.mysql_real_escape_string(stripslashes($itemData)).”‘ and album = ‘”.mysql_real_escape_string(stripslashes($itemData2)).”‘ order by tracknum”; //print $querystr; $tracks = $wpdb->get_results($querystr); foreach($tracks as $track){ if(isset($track->tracknum)){ echo “
“.$track->tracknum.” – ” . $track->artist . ” – “.$track->title.”
“; }else{ echo “
“.$track->title.”
“; } } } } ?>Please help, this plugin could be the best plugin I found to do what I want, and it seems to be broken.
Thanks in advance.
Christian.
- The topic ‘php code showing instead of track names’ is closed to new replies.