I am currently using a form where a user can enter a page number. After the user enters a page number (value must be between 1-555) they click the 'Search' button and are taken to a page that displays the page (viewPage.php). This works well, the only problem is I want the address to display the actual page, for example page3.html and not viewPage.php.
Here is the code for viewPage.php:
<?php
$url = "http://urltosite.com/$input.html";
if ($input <= 555) {
readfile($url);
}
else {
print("<b><font color=#cc0000>Invalid Entry! Please enter a number between 1 and 555</font></b>");
}
?>
What do I need to change/add so that the browser will display the actual page and not viewPage.php. Could I use a case/switch statement? If so, how?
Thanks in advance,
bobII