I've been working on a script for displaying screenshots. I got it to work basically, but what happens is that once the script is done executing, none of the HTML code after the script shows up in the browser's source code. Here's what I have right now:
<?php
$show = $_GET['show'];
$first = $_GET['first'];
$last = $_GET['last'];
$num = $first;
function displayscreens($show, $first, $last) {
print "<img src=http://www.phpbuilder.com/board/archive/index.php/\"images/" . $show . "/" . $first . ".jpg\"><br><br>\n";
if ($first < $last) {
$first++;
displayscreens($show, $first, $last);
}
else {
exit;
};
};
displayscreens($show, $num, $last);
?>
If you'd like to see a sample page, go here (<!-- m --><a class="postlink" href="http://add.ketsukaiten.net/index22.php?tare=screenshots/display&show=bebopss/movie&first=1&last=50">http://add.ketsukaiten.net/index22.php? ... =1&last=50</a><!-- m -->) and see what happens at the bottom. Go here (<!-- m --><a class="postlink" href="http://add.ketsukaiten.net/index22.php">http://add.ketsukaiten.net/index22.php</a><!-- m -->) to see what it normally looks like. Check the source code of each of them...You sure you got this in the right forum? Anyway, you're not getting anything because you're telling the script to stop processing. That's what exit is for. Try return.Ah, okay, thanks. Well, I put this in here due to the fact that I'm on PHP5. I suppose it should probably go in Coding? I'll make sure to do that next time...
<?php
$show = $_GET['show'];
$first = $_GET['first'];
$last = $_GET['last'];
$num = $first;
function displayscreens($show, $first, $last) {
print "<img src=http://www.phpbuilder.com/board/archive/index.php/\"images/" . $show . "/" . $first . ".jpg\"><br><br>\n";
if ($first < $last) {
$first++;
displayscreens($show, $first, $last);
}
else {
exit;
};
};
displayscreens($show, $num, $last);
?>
If you'd like to see a sample page, go here (<!-- m --><a class="postlink" href="http://add.ketsukaiten.net/index22.php?tare=screenshots/display&show=bebopss/movie&first=1&last=50">http://add.ketsukaiten.net/index22.php? ... =1&last=50</a><!-- m -->) and see what happens at the bottom. Go here (<!-- m --><a class="postlink" href="http://add.ketsukaiten.net/index22.php">http://add.ketsukaiten.net/index22.php</a><!-- m -->) to see what it normally looks like. Check the source code of each of them...You sure you got this in the right forum? Anyway, you're not getting anything because you're telling the script to stop processing. That's what exit is for. Try return.Ah, okay, thanks. Well, I put this in here due to the fact that I'm on PHP5. I suppose it should probably go in Coding? I'll make sure to do that next time...