Forum Moderators: coopster
<html>
<head>
</head>
<body>
<p><a href="default.asp?">default</a></p>
<p><a href="default.asp?page=1">page 1</a></p>
<p><a href="default.asp?page=2">page 2</a></p>
<p><a href="default.asp?page=3">page 3</a></p>
<%
If Len(Request.QueryString("page"))=0 Then
%>
You are on the default page
<%
Elseif Request.QueryString("page")="1" Then
%>
You are on page 1
<%
Elseif Request.QueryString("page")="2" Then
%>
You are on page 2
<%
Elseif Request.QueryString("page")="3" Then
%>
You are on page 3
<%
End If
%>
<body>
</html>
I was wondering if you could do this with PHP?
or convert it to PHP?
I know that in PHP you could redirect to another page with query strings but i would like to have as little pages as possible and keep the information on one page istead of multiple pages.
I appreciate your help, Thank you
<html>
<head>
</head>
<body>
<p><a href="default.php?page=1">page 1</a></p>
<p><a href="default.php?page=2">page 2</a></p>
<p><a href="default.php?page=3">page 3</a></p>
<?php
$page=$_GET['page'];
switch($page) {
case "1" :?>
you are on page 1
<?php break; case "2" :?>
you are on page 2
<?php break; case "3" :?>
you are on page 3
<?php break; default:?>
you are on the default page
<?php }?>
<body>
</html>
ASP and PHP are so similar~!