suspect_device Posted April 28, 2007 Share Posted April 28, 2007 I have an sql query that pulls an image filename out and displays that image. echo "<img src='/images/thumbnails/{row["Filename"]}' width='75' height='50'>"; I have another images folder with the larger pictures, they also have the same filename. What I'm trying to do with no success! is for the thumbnail image displayed from the query be an hyperlink to a blank page and display the larger image. Hope anyone can help. Thanks. Link to comment https://forums.phpfreaks.com/topic/49061-creating-an-hyperlink-from-a-sql-query-image/ Share on other sites More sharing options...
papaface Posted April 28, 2007 Share Posted April 28, 2007 You'd need something like this: ?> <a href="/images/<?php echo row["Filename"]; ?>"><img src="/images/thumbnails/<?php echo row["Filename"]; ?>" width="75" height="50"></a> <?php Quite simple really. Link to comment https://forums.phpfreaks.com/topic/49061-creating-an-hyperlink-from-a-sql-query-image/#findComment-240365 Share on other sites More sharing options...
suspect_device Posted April 28, 2007 Author Share Posted April 28, 2007 Ah, know where i went wrong now, got my syntax slightly wrong. Thanks a lot, much appreciated. Mike. Link to comment https://forums.phpfreaks.com/topic/49061-creating-an-hyperlink-from-a-sql-query-image/#findComment-240374 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.