Wrox Programmer Forums
BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0
This is the forum to discuss the Wrox book Beginning PHP5, Apache, and MySQL Web Development by Elizabeth Naramore, Jason Gerner, Yann Le Scouarnec, Jeremy Stolz, Michael K. Glass; ISBN: 9780764579660
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old June 5th, 2006, 04:46 AM
Registered User
Join Date: Jun 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default image formatting (ch.7)

Hi all,
i have been learning the photo gallery script in ch.7 and was wondering if anyone could help with this:

while ($rows = mysql_fetch_array($getpic)) {
 echo "<tr>\n";
 echo "<td align=center><a href=\"".$ImageDir . $image_id . ".jpg\">";
 echo "<img src=\"".$ImageThumb . $image_id . ".jpg\" border=\"0\">";

instead of calling the .jpg, i would like to call an html formatted page with the .jpg embedded into it. if anyone knows a simple way to do this, please help a php noob out :)

Old October 18th, 2006, 12:52 PM
Registered User
Join Date: Oct 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts

pass the image details to the URL and then using a new php file
echo "<td align=center><a href=\"pageyouwant.php?image=".$image_id.">";
 echo "<img src=\"".$ImageThumb . $image_id . ".jpg\" border=\"0\">";

then you will have a php file called pageyouwant.php

and the first thing is
$image_id = $_GET['image_id'];
use this then to create a new page showing your image
echo "<img src=\"images/".$image_id."jpg\">";

hope it helped and made sense

Similar Threads
Thread Thread Starter Forum Replies Last Post
Upload image-create & save thumbnail-display image angshujit ASP.NET 2.0 Professional 6 July 11th, 2013 10:34 PM
set image on <asp:Image> stored in DataBase myself.panku ASP.NET 2.0 Professional 1 August 11th, 2008 10:41 AM
Ch 8: <asp:image> inside <a> & ext.CSS (pg. 274) epc BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 1 July 12th, 2008 04:37 AM
Unable to set image or cursor property, Ch 12. VictorVictor BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 5 April 26th, 2006 10:49 AM
Ch. 4 & Ch. 12 athena BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 0 July 23rd, 2004 10:54 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.