My code is: <?php require_once ('global.php'); require_once ('include/class_pagination.php'); $getdetails = "SELECT * FROM `users` ". "WHERE `username` = '" . mysql_real_escape_string(stripslashes(trim($_GET['user']))) . "'"; $getdetailsresult = mysql_query($getdetails) or die(mysql_error()); $getdetailscount = mysql_num_rows($getdetailsresult); if($getdetailscount == 0) { die('No user found!'); } $details = mysql_fetch_array($getdetailsresult); $title = $details['username'] . "'s profile"; $username = '' .$details['username'] . ''; $location = '' . $details['location'] . ''; $interests = '' . $details['interests'] . ''; $about = '' . $details['about'] . ''; $test = $favorites = "SELECT * FROM `favorites` WHERE `user_id` = '" . $details['user_id']. "' "; $favoritesresult = mysql_query($favorites) or die(mysql_error()); $favoritescount = mysql_num_rows($favoritesresult); while($favorite = mysql_fetch_array($favoritesresult)){ $getitle = "SELECT `title`, `filename` FROM `files` WHERE `file_id` = '" . $favorite['file_id'] . "'"; $getitleresult = mysql_query($getitle) or die(mysql_error()); $titles = mysql_fetch_array($getitleresult); echo '<img src="http://www.boredombase.com/thumbnails/' . $titles['filename'] . '.png" /><a href="http://yoursite.com/' . $favorite['file_id'] . '-' . str_replace(' ', '-', strtolower($titles['title'])) . '.html">' . $titles['title'] . '</a><br />'; } $tpl->output_page ('profile'); ?> PHP: This shows as: http://www.boredombase.com/profile.php?user=admin Basically, $5 to anyone who can make it so them 3 images and text display underneath username/location/etc etc. EDIT: I use a template system, so where you see $test =, this allows me to use {test} to show that piece of script..
<?php require_once ('global.php'); require_once ('include/class_pagination.php'); $getdetails = "SELECT * FROM `users` ". "WHERE `username` = '" . mysql_real_escape_string(stripslashes(trim($_GET['user']))) . "'"; $getdetailsresult = mysql_query($getdetails) or die(mysql_error()); $getdetailscount = mysql_num_rows($getdetailsresult); if($getdetailscount == 0) { die('No user found!'); } $details = mysql_fetch_array($getdetailsresult); $title = $details['username'] . "'s profile"; $username = '' .$details['username'] . ''; $location = '' . $details['location'] . ''; $interests = '' . $details['interests'] . ''; $about = '' . $details['about'] . ''; $favorites = "SELECT * FROM `favorites` WHERE `user_id` = '" . $details['user_id']. "' "; $favoritesresult = mysql_query($favorites) or die(mysql_error()); $favoritescount = mysql_num_rows($favoritesresult); while($favorite = mysql_fetch_array($favoritesresult)){ $getitle = "SELECT `title`, `filename` FROM `files` WHERE `file_id` = '" . $favorite['file_id'] . "'"; $getitleresult = mysql_query($getitle) or die(mysql_error()); $titles = mysql_fetch_array($getitleresult); echo '<img src="http://www.boredombase.com/thumbnails/' . $titles['filename'] . '.png" /><a href="http://yoursite.com/' . $favorite['file_id'] . '-' . str_replace(' ', '-', strtolower($titles['title'])) . '.html">' . $titles['title'] . '</a><br />'; } $tpl->output_page ('profile'); ?> PHP: try that .....