How To Manipulate an iFrame with PHP?

Okay, so I have this project I’ve been working on for a while, and a big part of that project revolves around a very simple PHP script. I have very limited PHP knowledge, but have been trying for a while to learn.

What I’m trying to create is something very similar to a webcomic strip. I’d like to have an HTML iFrame object in the center of a page, with “Archive,” “First,” “Previous,” “Next,” and “Latest” buttons underneath or above it, with each link (aside from archive, of course) changing the page loaded into the iFrame. If possible, I want to be able to load in both HTML pages and PNG images (i.e. having something like 1.html, 2.png, 3.html all work together), but if that’s not possible or if it’s too complicated, I’d be fine with using just HTML.

This is the code I’ve been trying to work with to no avail:

[php]

<? $page_num = $_REQUEST['pg']; $page_num += 1; // Optional check if number is too large or so if($page_num > MAX) { $page_num = 1; } elseif($page_num < 0) { $page_num = MAX; } print 'Next'; ?> [/php]
Sponsor our Newsletter | Privacy Policy | Terms of Service