Len Whistler
06-05-2005, 05:29 AM
I need help on this script, which I got from a previous post of mine.
It passes on the values of "$row[im_name]" to the view.php page and displays the image when the link is clicked. But I can't figure out how to get it to also pass the values of "$row[im_comments]" to the view.php page at the same time. I would like the view.php page to show the image and the comments, which come from the MySQL database.
gallery.php
<?php
while($row = mysql_fetch_array($sql)){
echo "<table><a href=\"view.php?id=$row[im_name]\">
<img src=\"images/thumbs/$row[im_name]\"></a>
<span class=\"highlight\">$row[im_name]</span>
<br>$row[im_comments]<tr><hr>";
}
?>
Values "$row[im_name]" and "$row[im_comments]" to be passed to the view.php. "$row[im_name]" values are passed successfully.
view.php
<?php
$iName = $_GET['id'];
?><table><img class="view" src="images/ads/<?echo "$iName";?>.jpg"></table>
Thanks
Leonard Whistler
It passes on the values of "$row[im_name]" to the view.php page and displays the image when the link is clicked. But I can't figure out how to get it to also pass the values of "$row[im_comments]" to the view.php page at the same time. I would like the view.php page to show the image and the comments, which come from the MySQL database.
gallery.php
<?php
while($row = mysql_fetch_array($sql)){
echo "<table><a href=\"view.php?id=$row[im_name]\">
<img src=\"images/thumbs/$row[im_name]\"></a>
<span class=\"highlight\">$row[im_name]</span>
<br>$row[im_comments]<tr><hr>";
}
?>
Values "$row[im_name]" and "$row[im_comments]" to be passed to the view.php. "$row[im_name]" values are passed successfully.
view.php
<?php
$iName = $_GET['id'];
?><table><img class="view" src="images/ads/<?echo "$iName";?>.jpg"></table>
Thanks
Leonard Whistler