/    Sign up×
Community /Pin to ProfileBookmark

i currently have a variable in a php script $redirect =”mainmenu.php”

how can i get it so the redirect opens mainmenu.php and another page in another frame at the same time?

cheers for any help

to post a comment
PHP

7 Comments(s)

Copy linkTweet thisAlerts:
@SheldonFeb 01.2006 — Frames ? 1997....
Copy linkTweet thisAlerts:
@cashton2kauthorFeb 01.2006 — well iframe
Copy linkTweet thisAlerts:
@Pixel-ArtistFeb 21.2006 — just include it
Copy linkTweet thisAlerts:
@bathurst_guyFeb 22.2006 — You would require javascript for this
Copy linkTweet thisAlerts:
@Mester_PedizFeb 22.2006 — Yes you can do it, if your frames file is a php file, then according to what $redirect is set to, you can have a switch method or something, to determin what the second frame should be

like:

[code=php]$redirect = 'mainmenu.php';

switch($redirect) {

case "mainmenu.php":
$page_2 = 'whateverfile.php'
break;

case "anotherfile.php":
$page_2 = 'whateverfile2.php'
break;
}[/code]


Then you can have it update both frames, when you update the page.
Copy linkTweet thisAlerts:
@Skid94Oct 01.2006 — I am interested in adding code to an iframe that pulls from a php file. If the server is offline, is there a way to redirect to an image indicating off line? Thanks for any help.

Scott P
Copy linkTweet thisAlerts:
@SheldonOct 01.2006 — you may be able to use the php function [url=http://nz2.php.net/file_exists]file_exists()[/url]

something like...
[code=php]
<?php
if(file_exists("http://differentserver.com/file.php")){

include("http://differentserver.com/file.php");

}else{

echo("<img src="images/server_is_ofline.gif" alt="Server is offline" />");

}
?>
[/code]
×

Success!

Help @cashton2k spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.28,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...