Hi
I am building a search page and may pages are numbered:
(i.e) page27.asp
What I would like to do is if the page doesn't exist then to add 1 to the page number to test for that page.
(i.e) page28.asp
I am not sure how to do this but this is what I have thus far:
I am building a search page and may pages are numbered:
(i.e) page27.asp
What I would like to do is if the page doesn't exist then to add 1 to the page number to test for that page.
(i.e) page28.asp
I am not sure how to do this but this is what I have thus far:
Code:
<?
$page = $_POST['page'];
$url = "newRainbow/page" . $page . ".asp";
$filename = $url;
if (file_exists($filename))
{
header("Location: [URL unfurl="true"]http://www.mydomain.com/"[/URL] . $filename);
exit;
}
else
{
I WANT TO BE ABLE TO ADD ONE TO THE FILENAME HERE AND TEST WHETHER IT EXISTS
}
?>