Jump to content

Display frame on CERTAIN links


sphinx

Recommended Posts

Hello,

 

I'm want to manually configure what URL's can display a frame, in which I'm using this:

 

$frame = 1;

 

I basically need a code in which I can define what links display the frame, otherwise, the below code shows:

 

$frame = 0;

 

All my links follow the following format:

 

http://site.com/link

http://site.com/link2

 

Thanks!

 

PS:

 

I've provided an example of code to help you understand, however, i'm unsure how to allow multiple prefix's and include 'else':

 

$link ='index.php?link';
if (isset($_GET['link']))
$frame = 1;
} else {
$frame = 0;

 

No echo required, it's a config.php file.

Link to comment
https://forums.phpfreaks.com/topic/247911-display-frame-on-certain-links/
Share on other sites

I sincerely have no idea what you mean...

 

The code you have would work, in the sense that if ?link is present in the url, then it would make the variable $frame equal 1, otherwise 0 (as long as you remove the first line and close the block off with the missing } after your last line)

 

What exactly are you trying to achieve? Having a config file that gets modified based on your url kind of beats the point of having a config file, in the sense that you're doing the configuration through the url and not through the config file...

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.