Can we have a totally new page with php when click on the new button?
I have a site lets name it http://mysite.com/index.php
which is my main site with all the information and I want to have another page which is something like http://mysite.com/index.php?=premium
and in this premium
page will be totally new whole page. Which means not the same title or not have anything relate to the index.php page.
The reason is that I don't want my visitors to go directly to the premium page
so they have to come to the index.php
page first then click it from there.
Is that possible this way?
@knittl well not sure if my question was cleared
but what is actually happening now that the above code can get me to the premium page fine with no problem
but inside the premium page include many div class and I have this in the premium page
<?php
if(!isset($_GET['ch'])){
$ch = 1;
} else {
$ch = $_GET['ch'];
}
if ($ch == 1) {
echo "<div class='player_live_server_info'>
so what happen now that I have this
<li><a href="tv.php?page=premium?ch=1"><img src="live_img/ch_5.jpg"></a></li>
I don't know if I do it right or wrong b开发者_如何学JAVAut It just redirect back to the normal page.
<?php if(isset($_GET['page']) && $_GET['page'] == 'premium') {
// this is the premium version, only visible when called as index.php?page=premium
?>
<html>
<head><title>you are on the fancy premium page</title></head>
<body>
<h1>your premium page</h1>
</body>
</html>
<?php } else {
// this is the normal page with a link to the premium version
?>
<html>
<head><title>you are on the lame normal page</title></head>
<body>
<h1>your normal page</h1>
<p>
<a href="?page=premium">click here to go to our premium page</a>
</p>
</body>
</html>
<?php } ?>
$_GET['something'] is the best choice for you..you can also use $_SESSION, but that will be complicated plus make your application slower.
精彩评论