Re: Create Static Page from JPEG
Posted: Fri Jul 31, 2009 9:33 am
I couldn't get what you showed me to work, but I have made some progress with your help with view.php.
My main_image div code looks like this now...
When I click a .jpg, in the main_image div, a new page opens (now with a header and footer...yay) and it works great. But, it loads the same image into the new page whatever image I click in the main_image div. I guess it's loading the first image in the array which I don't want.
The bit that is really confusing me is what to put after view.php?n= in my main_image div so that the corresponding image loads into the new page. I can't seem to get the a href information of the main image into view.php.
I was wondering if there was a way to scan the main_image div for the a href of the image, and put that information into some sort of PHP code? So then I would have view.php?n=<?php code ?>?
Edit: In fact, forget the <?php $p = $posts[0]; ?> that is for something else I need to run. I just have that so the first thumbnail of the first image shows when you initially load the page.
My main_image div code looks like this now...
Code: Select all
<?php $p = $posts[0]; ?><a href="http://www.domain.com/view.php?n=<?php echo $p['image']; ?>"><img src="" /></a>The bit that is really confusing me is what to put after view.php?n= in my main_image div so that the corresponding image loads into the new page. I can't seem to get the a href information of the main image into view.php.
I was wondering if there was a way to scan the main_image div for the a href of the image, and put that information into some sort of PHP code? So then I would have view.php?n=<?php code ?>?
Edit: In fact, forget the <?php $p = $posts[0]; ?> that is for something else I need to run. I just have that so the first thumbnail of the first image shows when you initially load the page.