Thread: POTD question
View Single Post
Old 2007-01-09, 10:43 PM   #3
JK
Well you know boys, a nuclear reactor is a lot like women. You just have to read the manual and press the right button
 
Join Date: Nov 2003
Posts: 157
For the following url: www.x.com/potd.php?site=webcutie&type=thumb1

you would need to have pictures in a folder named 'webcutie' (or whatever you have after ?site=), beginning with 'thumb1-' (or whatever you have &type=) before each of the 31 images.

/potd.php
/webcutie/thumb1-01.jpg
/webcutie/thumb1-02.jpg
/webcutie/thumb1-03.jpg
etc.

PHP Code:
<?php

$site 
$_GET['site'];
$type $_GET['type'];

$day date("d");

$date date("l jS F Y");

print (
"<CENTER><FONT FACE=arial, helvetica SIZE=4>Picture Updated: $date</FONT>");

print (
"<BR><BR>");

switch (
$day) {
    
case 
01:
print (
"<IMG SRC=$site/$type-01.jpg BORDER=2>");
break;
    
case 
02:
print (
"<IMG SRC=$site/$type-02.jpg BORDER=2>");
break;

case 
03:
print (
"<IMG SRC=$site/$type-03.jpg BORDER=2>");
break;

// etc. etc.
}
?>
__________________
To alcohol! The cause of, and solution to, all of life’s problems

Last edited by JK; 2007-01-09 at 11:38 PM.. Reason: typo
JK is offline   Reply With Quote