# Php content display in own page

**URL:** <https://forum.kirupa.com/t/php-content-display-in-own-page/274610>\
**Category:** Uncategorized\
**Created:** [November 1, 2008, 2:46am UTC](https://forum.kirupa.com/t/php-content-display-in-own-page/274610 "2008-11-01T02:46:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hoj78](https://avatars.discourse-cdn.com/v4/letter/h/b9bd4f/32.png) [@hoj78](https://forum.kirupa.com/u/hoj78)\
**Post date:** [November 1, 2008, 2:46am UTC](https://forum.kirupa.com/t/php-content-display-in-own-page/274610/1 "2008-11-01T02:46:45Z")

</div>

Hi All,

I am currently upgrading a site and would like to combine 2 pages into 1, Currently I have a page that displays band names pulled from a db with sql, I want make it so when a user clicks on the band name a list of their release’s displays is pulled from the db and displayed on the page.

I am stuck with which way to do this and am not sure it needs to be AJAX or CSS.

Here is the code that display the band name at the moment

```php
echo "<table>";
while ($row=SQL_fetch_array($res)){
			echo "<tr><td>";
			$ren_url=make_redundant_url($row['title']);
			echo "</td><td><a href='band_info.php?id=".$row['id_band']."$ren_url'>".$row['title']."</a></td>";

			echo "</tr>";
}			
echo "</table>";			
?>

```

And here is the code that displays that displays the releases at the moment

```php
while ($row=SQL_fetch_array($res)){
			$ren_url=make_redundant_url($row['bandname'],$row['title']);
			echo "<div class=\"catalogue_item\"><a href='release_detail.php?id=".$row['id_release'].$ren_url."'><img src='tinyimage.php?file=uploads/releases/".$row['imageurl']."' border='0'></a><a href='release_detail.php?id=".$row['id_release'].$ren_url."'>".$row['catnum']."</a> <b>".$row['bandname']."</b>-<i>'".$row['title']."'</i> ".$row['type'];
				if ($row['date_avail']<>""){
					if ($row['date_avail']>time()){
						echo " <u><i>available ".date("D d M",$row['date_avail'])."</i></u> ";
					}
				 }				
				 if ($row['new']==1){
					echo " <b><font color='#FF0000'>NEW!!</font></a></b> ";
				 }				
			echo "</div>";
}			
?>

```

As always any help would be appreciated
