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

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.