Jump to content

php content display in own page


Remote Control

Recommended Posts

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

 

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

 

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[/code]

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.