only image path displays

images php coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply
User avatar
php-forum Fan User
php-forum Fan User
Posts: 84
Joined: Sat May 21, 2011 10:26 pm

Wed May 25, 2011 10:37 am

Hello Helix
On this case while you clicking a image in gallery which leads to the photo displaying page along with comments. So you have to pass an value to this page in URL like below

Code: Select all

<a href="phototemplate.php?photoid=1"><img src="image.jpg" /></a>
In phototemplate.php page get the value from URL and write an query to fetch the image as well as comments

Code: Select all

$query="SELECT * FROM photo where id=".$_REQUEST['photoid']."";
Hope this help you..For more details you can visit
Thank You
New php-forum User
New php-forum User
Posts: 13
Joined: Mon Jun 13, 2011 4:08 am

Mon Jun 13, 2011 4:55 am

well this is a easy task you need to display image info along with comment associated with it make url for the image template page and pass some id DB unique info along with that will help you getting info from the DB.
I think this will help.
If have any problem on PHP kindly make a visit at
Post Reply