Jump to content

need to use query string variable in NEW if/else statement


jhodara

Recommended Posts

Hi,

My issue here is that I cant get my query string variables to ONLY feed into if/else statement  on my secondary page. I include my secondary page (fine.php) from my index page. My query string variables keep being fed back into my original if/ese statement on index.php.

 

here is the if/else on index.php (these links work fine):

 

<?php
if($_SERVER['QUERY_STRING']=='/index.php' || $_SERVER['QUERY_STRING']=='')
{
		include 'port.php';
}		

elseif (isset($_GET['pos'])){
		include 'pos.php';
}	

elseif (isset($_GET['web'])){
		include 'web.php';
}

elseif (isset($_GET['fine'])){
		include 'fine.php';
}	

        else {include '404.php';}


 

 

 

here is the if/else on my secondary page (fine.php). These links are supposed to alert the if/else in the next table cell. However, they instead alert the if/else in index.php.

 

	
<td><br/>
<a href="?backset"><img src="fine/thumbs/x-backset.jpg" border="0"></a><br/><br/> 
<a href="?backside"><img src="fine/thumbs/x-backside.jpg" border="0"></a><br/><br/> 
<a href="?bannerprint"><img src="fine/thumbs/x-bannerprint.jpg" border="0"></a><br/><br/> 
<a href="?chopu"><img src="fine/thumbs/x-chopu.jpg" border="0"></a><br/><br/> 
</td>
<td><br/>
<div id="DivPiece" align="left">
<?PHP 

if (isset($_GET['backset'])){
       include 'fine/backset.php';
}

elseif (isset($_GET['backside'])){
     include 'fine/backside.php';
}	

elseif (isset($_GET['bannerprint'])){
     include 'fine/bannerprint.php';
}

elseif (isset($_GET['chopu'])){
include 'fine/chopu.php';
}

?>
</div>
</td>

 

How can I get the links on the secondary page to only alert the if/else statement on that page, and BLOCK the if/else statement on index.php from seeing them? I still want to use the query string though.

 

Thanks!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.