sphinx Posted September 26, 2011 Share Posted September 26, 2011 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. Quote Link to comment https://forums.phpfreaks.com/topic/247911-display-frame-on-certain-links/ Share on other sites More sharing options...
WebStyles Posted September 26, 2011 Share Posted September 26, 2011 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... Quote Link to comment https://forums.phpfreaks.com/topic/247911-display-frame-on-certain-links/#findComment-1273008 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.