Search found 13 matches

by Nytol
Fri Jul 31, 2009 11:25 am
Forum: PHP - Code
Topic: Create Static Page from JPEG
Replies: 21
Views: 1370

Re: Create Static Page from JPEG

I'm not sure I understand... What's $p['image']? $p['image'] is the images stored in my database. I call these images into thumbnail div. It gets a little bit crazy because I also added an image resizer (image.php). This is the code in my thumbnail div... <a href="http://www.domain.com/common/...
by Nytol
Fri Jul 31, 2009 11:21 am
Forum: PHP - Code
Topic: Create Static Page from JPEG
Replies: 21
Views: 1370

Re: Create Static Page from JPEG

Yep. Exactly. thumbnail div - Bunch of thumbnails main_mage div - A big image which appears after you click a thumbnail. Both divs on index.php in the root of the webserver. I got the code from a really cool banner rotator (http://www.sohtanaka.com/web-design/examples/image-rotator/) Now after the t...
by Nytol
Fri Jul 31, 2009 9:33 am
Forum: PHP - Code
Topic: Create Static Page from JPEG
Replies: 21
Views: 1370

Re: Create Static Page from JPEG

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... <?php $p = $posts[0]; ?><a href="http://www.domain.com/view.php?n=<?php echo $p['image']; ?>"><img src="" /></a> When I click a .jp...
by Nytol
Fri Jul 31, 2009 7:17 am
Forum: PHP - Code
Topic: Newbie: foreach
Replies: 2
Views: 173

Re: Newbie: foreach

Thanks so much!

Code: Select all

<?php $p = $posts[0]; ?>
worked like a charm. Incredible.
by Nytol
Thu Jul 30, 2009 8:08 pm
Forum: PHP - Code
Topic: Create Static Page from JPEG
Replies: 21
Views: 1370

Re: Create Static Page from JPEG

Thanks! Will give this a go. :)
by Nytol
Thu Jul 30, 2009 6:52 pm
Forum: PHP - Code
Topic: Create Static Page from JPEG
Replies: 21
Views: 1370

Re: Create Static Page from JPEG

Right, the problem I am having is that I have no way of passing the name of the image in the div (and path to the image) into view.php. Each image name, and path to the image, is unique so how would I do that? Any ideas? I have thumbnails in one div, and when you click the thumbnail you see the full...
by Nytol
Thu Jul 30, 2009 5:38 pm
Forum: PHP - Code
Topic: Create Static Page from JPEG
Replies: 21
Views: 1370

Re: Create Static Page from JPEG

Okay thanks jackpf. I will try and see what I can come up with. Thanks for your help, really appreciate it. :)
by Nytol
Thu Jul 30, 2009 4:55 pm
Forum: PHP - Code
Topic: Create Static Page from JPEG
Replies: 21
Views: 1370

Re: Create Static Page from JPEG

Let's say my html page (index.php) looks like this:- <head> <body> <img src="image1.jpg"> </body> </html>   I want to create a "permalink" above the image so when you click the link it would go to a new page called image1.html, with the image in it. And the new page (image1.html)...
by Nytol
Thu Jul 30, 2009 4:46 pm
Forum: PHP - Code
Topic: Create Static Page from JPEG
Replies: 21
Views: 1370

Re: Create Static Page from JPEG

You wouldnt happen to have a bit of code example I would put in the view.php file and in my main HTML page (above the image) would you? I know it's asking a lot, but it would help tremendously.
by Nytol
Thu Jul 30, 2009 4:40 pm
Forum: PHP - Code
Topic: Create Static Page from JPEG
Replies: 21
Views: 1370

Re: Create Static Page from JPEG

Someone suggested this... OK Just use $_GET Make a new file called view.php $pic = mysql_real_escape_string($_GET['n']); echo '<img src="http://www.site.com/pictures/' . $pic . '.jpg" />' So you can generate a url like http://www.site.com/view.php?n=123 PHP will take the variable 123 in th...
by Nytol
Thu Jul 30, 2009 4:28 pm
Forum: PHP - Code
Topic: Create Static Page from JPEG
Replies: 21
Views: 1370

Re: Create Static Page from JPEG

Because I want a way for people to DIGG, bookmark etc. And have the ability to add banners if I wish. I can't do that with just a JPG. It would be cool to have a page where people can comment on the image too, and rate it. I can't even add a Home link to just a JPG. :(
by Nytol
Thu Jul 30, 2009 4:20 pm
Forum: PHP - Code
Topic: Create Static Page from JPEG
Replies: 21
Views: 1370

Create Static Page from JPEG

Hey all, me again. :D Lets say I have a page with an image. Is there any way to add a permalink to the image, and when a user clicks it, a new static page with the image embedded is created? Lets say my page is called index.php and the image is called 13332fun.jpg. The new page would be 13332fun.php...
by Nytol
Thu Jul 30, 2009 4:13 pm
Forum: PHP - Code
Topic: Newbie: foreach
Replies: 2
Views: 173

Newbie: foreach

I am (trying) to create an online gallery. I have a div to show the thumbnails, and a div to show the main image when you click the thumbnail (I guess like a banner rotator). Main Image Div: <div class="main_image"><img src="<?php echo $p['image']; ?>"/></div> Thumbnail Div: <?ph...