printing from database n hyperlinking them

I am printing my last 8 rows of my database into my home page…It gets printed

But i need each row shud have different hyperlinks…I dont know how to do it…as of now tis is my code in my webpage

<?php while($row=mysql_fetch_array($result8)) {
               $titleb=$row["titleb"];
			 		   ?>

<p align="left" class="newstitlestyle"><img src="images/star.png" width="20" height="20" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="gallery.php" ><?php echo $titleb."<br><br>"  ?></a>  
	<? }  ?>

how are you going to get the hyperlinks? from some array or database field?

Familiar with passing value by URL?

Try to include in your selection the ID or any holder of $titleb and then append it as parameter to gallery.php, like:

<?php echo
$titleb."

" ?>

Then, use URL GET or POST to perform customized actions in gallery.php.

Thx a lot code guru :slight_smile:

Sponsor our Newsletter | Privacy Policy | Terms of Service