How do I write the php so that a variable is sent to a single page and then the page loads and assigns the correct variables to the parts that need to change?
if the url is "view.php3?date=2005-04-27&res=l" then your view script could do this:
<?
$filename = $_GET['date'];
// strip elements which could lead to manipulations
$filename = str_replace('.', '', $filename);
$filename = str_replace('/', '', $filename);
// assume your files are gifs - append extension
$filename .= '.gif';
// check whether such a file exists at all
// this is a FILESYSTEM path!
$fullpath = '/your/path/to/comic_strips/'.$filename;
if(is_readable($fullpath))
{
// note that this is an URL (absolute with http: / / or relative)
echo "<img src=\"your/url/to/comic_strips/$filename\" />";
}
?>
similarly you could generate "last" and "next" strip links.
best thing would be to read in a complete list of all available comic strips. for this, look up the "dir" object under "filesystem functions" in the manual: www.php.net
if you already know actionscript, this will be easy for you.
just a hint on how you can mix php and html code:
<html><head>
<p>Everything outside the php brackets will be passed through.<br />
<?
// this however is php code
$variable = "hello";
echo "I say: ".$variable."<br />";
?>
There is a short variant for variable output, too: Let's say <?=$variable ?> again!</p>
</body></html>
hope this helps.