Thank you for the tutorial last time on query strings :)
It worked for me, this is my working query string:

<?
$i=$_GET['vehicle'];
switch ($i) {
case Chrysler:
    include("chryslernew.php");
    break;
case Chevrolet:
    include("chevnew.php");
    break; 
default:
    echo "include ("nopage.php")";
}
?>

However, I'm trying to get my PHP URLs with query strings that have multiple pages to look like this:

http://library.digiguide.com/lib/programmenextshowing/238308&hPage=3

I can get the question mark in query string URLs with no problem, but the ampersand has proven difficult for me to get right.
How would I be able to do this in PHP?

What would I have to do to my query string?:

<?
$i=$_GET['carname'];
switch ($i) {
case 1:
    include("1.php");
    break;
case 2:
    include("2.php");
    break;
default:
    echo "page not found!!!!";
}
?>
This article has been dead for over six months. Start a new discussion instead.