PHP to conditionally load a url in a particular frame

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
dickey
Forum Commoner
Posts: 50
Joined: Thu May 16, 2002 8:04 pm
Location: Sydney, Australia

PHP to conditionally load a url in a particular frame

Post by dickey »

Q1: How do I (in PHP) load a url into a particular html frame.

This is what I have in mind.

Code: Select all

<?
if (session_is_registered("status") = true)

// load url w into frame a
// load url x into fram b

else

// load url y into frame a
// load url z into fram b

?>
Any assistance will be appreciated.

- Andrew
User avatar
roninblade
Forum Newbie
Posts: 21
Joined: Thu Jun 13, 2002 7:12 pm

Post by roninblade »

Code: Select all

<? 
  if (session_is_registered("status") = true) &#123;
    $file1 = "file1a.html";
    $file2 = "file2a.html";
  &#125; else &#123;
    $file1 = "file1b.html";
    $file2 = "file2b.html";
  &#125;
?> 
<frameset>
  <frame src="<?=$file1?>">
  <frame src="<?=$file2?>">
</frameset>
Post Reply