Page 1 of 1

PHP to conditionally load a url in a particular frame

Posted: Mon Jul 08, 2002 10:59 pm
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

Posted: Tue Jul 09, 2002 3:39 am
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>