bpat1434 wrote:

I think (correct me if I'm wrong) that random.php will load a SWF file at random. So zoobie needs to echo the contents of the include at a certain point in the file.

~Brett

Exactly...It's picking at random a swf clock for placement at a certain part of the page.

I think I already tried
file_get_content('random.php');
but it just printed that out on the screen

Any clues how do?

below is random.php

<?
//***************EDIT FROM HERE*********************
//Any directory name should end by the trailing "/"
$your_dirname="clocks/";//replace the "images/" by the name
// of the directory where you image files are placed, note that the trailing "/" is mandatory

//You can change this if you want but it is not mendatory 
$your_alt_tag="Performing Arts Film and Video";// You may change this line

function displayaaphprandomimage($dirname, $alt){
  $dirhandle = opendir($dirname);
  while (false !== ($file = readdir($dirhandle))) {
    if ($file != "." && $file != ".." && !@is_dir($file) ) {
      $filelist[] = $file;
    }
  }
  closedir($dirhandle); 

  if(sizeof($filelist) ==0) { 
    echo "No file was found in the directory!";
    exit;
  }

  srand((double)microtime()*1000000);
  $picnum = @mt_rand(0, sizeof($filelist) - 1);
  $imageName=$dirname.$filelist[$picnum];
  $imageSize = getimagesize($imageName);

 if($imageSize[2]==4 || eregi(".swf$", $imageName) ) {
 $result="\n<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width=\"400\" height=\"400\">";
 $result .="\n<param name=\"movie\" value=\"".$imageName ."\">";
 $result .="\n<param name=\"quality\" value=\"high\">";
 $result .="\n<param name=\"bgcolor\" value=\"#000000\">";
 $result .="\n<param name=\"wmode\" value=\"transparent\">";

 $result .="\n<embed src=\"".$imageName ."\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"400\" height=\"400\" wmode=\"transparent\"></embed></object>";
	} else  $result="\n<img src=\"".$imageName ."\" width=\"400\" height=\"400\" alt=\"". $alt. "\">";

  return $result;

  }
?>
<?=displayaaphprandomimage($your_dirname, $your_alt_tag)?>

Thanks

    Try this:

    In the function (which you don't really need), change return $result; to echo $result. Then use [man]file_get_contents/man to get the contents of that file. It should just output in HTML, the clock object. So...

    <?Php
    
    $clock = file_get_contents('path/to/file.php');
    
    // Display other HTML junk....
    echo $clock;
    // Display rest of HTML junk....
    ?>

    ~Brett

      it just prints out

      echo "; $result .="\n"; $result .="\n"; $result .="\n"; $result .="\n"; } else $result="\n"; echo $result; } ?> ;

      where the clock should be...maybe it's the quotes

      I tried
      echo $clock
      and just
      $clock;
      since it's within an echo

      no go

        Try adding an HTML header to the other file, just before you echo out the contents.

        ~Brett

          not sure where...here's the dynamic page I want to echo

          <?php
          
          session_start();
          $_SESSION["access"] = $_POST["access"];
          $access = $_SESSION["access"];
          $clock = file_get_contents('random.php'); 
          
          if(isset($access)) {
          echo "<html>
          <head>
          <title>12 o'Clock Midnight - Art Film & Video</title>
          <style>
          a {font: bold 12px tahoma; color: #000000}
          p {text-indent: 20px; text-align: left}
          </style>
          </head>
          <body style='font: normal 18px tahoma verdana courier new arial; color: #efcb89; background-color: #000000; text-align:center'>
          <div style='margin:auto''><img src='img/header.png' style='margin:0px; padding: 0px'></div>
          <div><span style='font-size: 22px'>Art Film and Video</span></div>
          <br>
          
          <div style='width: 80%; margin-top: 25px; background-color: #efcb89;margin:auto'>
          <a href='http://buskercentral.com'>Acrobats</a>
          <a href='#'>Balloonatics</a>
          <a href='#'>Clowns</a>
          <a href='#'>Contorts</a>
          <a href='#'>Dance</a>
          <a href='#'>Escapes</a>
          <a href='#'>Fire</a>
          <a href='#'>Jugglers</a>
          <a href='#'>Magicians</a>
          <a href='#'>Musicians</a>
          <a href='#'>Puppets</a>
          </div>
          
          <br>
          
          <div style='width: 22%; margin-top: 25px; background-color: #efcb89;margin:auto'>
          <a href='#'>Classics</a>
          <a href='#'>Features</a>
          <a href='#'>Unique</a>
          </div>
          
          <br>
          
          <div style='width: 10%; height: 20px;margin-top: 25px; background-color: #efcb89;margin:auto'>
          <a href='#'>Directors Cut</a>
          </div>
          
          <br>
          
          <div style='width: 90%; border: 1px #efcb89 solid; margin:auto; padding: 10px'>
          
          <br>
          
          <div style='margin: auto'><img src='img/spot_performance.gif' style='width:600px; height: 75px'></div>
          
          <div>
          <img style='float:left' src='img/spot.gif'>
          <p>Let's take a look at some fun yet educational film and video that exemplifies this spotlight on street performing. These are of interest to both performers looking to expand their art as well as social scientists researching cultural behavior.
          <p>Unrestricted to indoor theatre and liable to perform just about anywhere, buskers and street performers roam the world with their impromptu performances. Because of their nomadic way of life, they are difficult to capture professionally on film and video. Your only hope may be to catch a live glimpse at music or street performing festivals and buskerfests.
          <p>You may stay as long as you wish but may only enter @ 12 o'Clock Midnight. If desired, you can leave your social and scientific observations on any performance video. Anyone can comment casually without registration. <img style='float: right' src='img/camera_clik.gif'>Videos are added on a monthly update when public comments are moderated and discarded. 
          <p>Let us now view the performers through the eyes of the camera and take a peek at what's really happening out there with rare footage of these buskers and street performers in action.
          </div>
          
          <br>
          
          echo $clock;
          
          </div>
          </body></html>";
          }
          
          else {
          	header ("Location: index.php");
          }
          
          
          ?>
          

            Okay, wrong script. I mean in random.php you might need to output headers:

            <?
            //***************EDIT FROM HERE*********************
            //Any directory name should end by the trailing "/"
            $your_dirname="clocks/";//replace the "images/" by the name
            // of the directory where you image files are placed, note that the trailing "/" is mandatory
            
            //You can change this if you want but it is not mendatory
            $your_alt_tag="Performing Arts Film and Video";// You may change this line
            
            function displayaaphprandomimage($dirname, $alt){
              $dirhandle = opendir($dirname);
              while (false !== ($file = readdir($dirhandle))) {
                if ($file != "." && $file != ".." && !@is_dir($file) ) {
                  $filelist[] = $file;
                }
              }
              closedir($dirhandle);
            
              if(sizeof($filelist) ==0) {
                echo "No file was found in the directory!";
                exit;
              }
            
              srand((double)microtime()*1000000);
              $picnum = @mt_rand(0, sizeof($filelist) - 1);
              $imageName=$dirname.$filelist[$picnum];
              $imageSize = getimagesize($imageName);
            
            if($imageSize[2]==4 || eregi(".swf$", $imageName) ) {
            $result="\n<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width=\"400\" height=\"400\">";
            $result .="\n<param name=\"movie\" value=\"".$imageName ."\">";
            $result .="\n<param name=\"quality\" value=\"high\">";
            $result .="\n<param name=\"bgcolor\" value=\"#000000\">";
            $result .="\n<param name=\"wmode\" value=\"transparent\">";
            
            $result .="\n<embed src=\"".$imageName ."\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"400\" height=\"400\" wmode=\"transparent\"></embed></object>";
                } else  $result="\n<img src=\"".$imageName ."\" width=\"400\" height=\"400\" alt=\"". $alt. "\">";
            
              return $result;
            
              }
            
            $html = displayaaphprandomimage($your_dirname, $your_alt_tag);
            header('Content-Type: text/html');
            echo $html;
            ?>

            Now, does random.php show a clock if you browse to it directly? Or does it show up blank? If it shows up blank, you've got an error somewhere. If it shows the clock, then file_get_contents() will work.

            ~Brett

              it's still just printing out:
              echo "; $result .="\n"; $result .="\n"; $result .="\n"; $result .="\n"; $result .="\n"; } else $result="\n"; return $result; } $html = displayaaphprandomimage($your_dirname, $your_alt_tag); header('Content-Type: text/html'); $html; ?> ;
              where the clock should be

              Using your code, you can browse to random.php and a clock will display @ URL removed

              You can check some source code at URL removed

              Appreciate the help...maybe we're on the edge of the language's limitations.

                Appreciate the help...maybe we're on the edge of the language's limitations.

                Far, far, far from it 😉

                Hi, I'm jumping in here in the middle, so I'm not sure if I'm caught up to speed. Just to clear it up for everyone, can you repost the contents of the two PHP files?

                  Sure...Thx for the interest.
                  Let's simplify things with the 2 files.
                  URL removed calls on the clocks folder and inserts a random swf clock even in it's own window
                  [url=http://]URL removed[/url] needs to include random.php somehow within an echo for placement on the dynamic page.

                  random.php
                  
                  <?
                  //***************EDIT FROM HERE*********************
                  //Any directory name should end by the trailing "/"
                  $your_dirname="clocks/";//replace the "images/" by the name
                  // of the directory where you image files are placed, note that the trailing "/" is mandatory
                  
                  //You can change this if you want but it is not mendatory 
                  $your_alt_tag="Performing Arts Film and Video";// You may change this line
                  
                  function displayaaphprandomimage($dirname, $alt){
                    $dirhandle = opendir($dirname);
                    while (false !== ($file = readdir($dirhandle))) {
                      if ($file != "." && $file != ".." && !@is_dir($file) ) {
                        $filelist[] = $file;
                      }
                    }
                    closedir($dirhandle); 
                  
                    if(sizeof($filelist) ==0) { 
                      echo "No file was found in the directory!";
                      exit;
                    }
                  
                    srand((double)microtime()*1000000);
                    $picnum = @mt_rand(0, sizeof($filelist) - 1);
                    $imageName=$dirname.$filelist[$picnum];
                    $imageSize = getimagesize($imageName);
                  
                   if($imageSize[2]==4 || eregi(".swf$", $imageName) ) {
                   $result="\n<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" 
                  
                  codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width=\"400\" height=\"400\">";
                   $result .="\n<param name=\"movie\" value=\"".$imageName ."\">";
                   $result .="\n<param name=\"quality\" value=\"high\">";
                   $result .="\n<param name=\"bgcolor\" value=\"#000000\">";
                   $result .="\n<param name=\"wmode\" value=\"transparent\">";
                  
                   $result .="\n<embed src=\"".$imageName ."\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" 
                  
                  type=\"application/x-shockwave-flash\" width=\"400\" height=\"400\" wmode=\"transparent\"></embed></object>";
                  	} else  $result="\n<img src=\"".$imageName ."\" width=\"400\" height=\"400\" alt=\"". $alt. "\">";
                  
                    return $result;
                  
                    }
                  ?>
                  <?=displayaaphprandomimage($your_dirname, $your_alt_tag)?>
                  
                  
                  access1.php
                  
                  <?php
                  session_start();
                  $_SESSION["access"] = $_POST["access"];
                  $access = $_SESSION["access"];
                  $clock = file_get_contents('random.php'); 
                  
                  if(isset($access)) { 
                  echo "<html>
                  $clock;
                  </html>";
                  }
                  else {
                  	header ("Location: index.php");
                  }
                  
                  ?>
                  

                  I think we're close with some quotes probably off somewhere when random.php is inserted.
                  As far as the language is concerned, I'm just saying this should be a lot easier as we're having all sorts of problems getting this to work.
                  Thanks

                    Let's simplify even further:

                    random.php

                    <?php
                    /**
                     *  Set default values
                     */
                    $dir = 'clocks/';
                    $files = array();
                    
                    /**
                     *  Get all SWF files into an array
                     */
                    $d = dir($dir);
                    while(FALSE != ($entry=$d->read()))
                    {
                      if($entry != '.' && $entry != '..')
                      {
                        if(substr($entry, strrpos('.', $entry)+1)=='swf')
                        {
                          $files[] = $entry;
                        }
                      }
                    }
                    $d->close();
                    
                    /**
                     *  Get a random swf file:
                     */
                    $swf_file = $files[rand(0, count($files)-1)];
                    
                    /**
                     *  Echo out the object tag
                     */
                    ?>
                    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="400" height="400">
                    <param name="movie" value="<?php echo $swf_file; ?>">
                    <param name="quality" value="high">
                    <param name="bgcolor" value="#000000">
                    <param name="wmode" value="transparent">
                    <embed src="<?php echo $swf_file; ?>" quality="high" pluginspace="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="400" height="400" wmode="transparent"></embed>
                    </object>

                    access1.php

                    <?php
                    $clock = file_get_contents('random.php');
                    
                    echo $clock;
                    ?>

                    That should give you the proper HTML to insert... at least it does for me...

                    Here's a quick thing i used: it returns the proper HTML, but I can't get the clock to show up:

                    <?php
                    
                    $contents = file_get_contents('http://www.12oclockmidnight.com/random.php');
                    
                    $contents = preg_replace("@<param name=\"movie\" value=\"([\w\/\.]*)\">@", "<param name=\"movie\" value=\"http://www.12oclockmidnight.com/$1\">", $contents);
                    
                    ?>
                    <html>
                    <head>
                     <title>my Random Clock:</title>
                    </head>
                    <body>
                    <?php echo $contents; ?>
                    </body>
                    </html>

                    ~Brett

                      How about making a random function with array in the page first. Then echo the swf params out and insert the result of the earlier random function?

                      Yikes....I'm getting lost. I have all these test pages and none work.

                      But it's educational and interesting...

                      Thanks

                        Hi

                        I had been looking for doing the exact same thing to be able to read a file into a variable for exaple. BUT I wanted the code AFTER php had been executed. Created a workaround with file_get_contents and then parsed that file and stuff like that. But I now know how to do this fast and easy. Here is the code to get a file into a variable, that can then be echoed.

                        		ob_start();
                        			include('yourfile.php');
                        			$html = ob_get_contents();
                        		ob_end_clean();
                        		echo($html);

                        Hope I understood your request right and that this helps.

                          In random.php comment out the <?= ?> stuff at the bottom.
                          In access.php make sure you 1) include 'random.php'; and 2) put the <?= ?> stuff where you want the clock to be.

                          That would be my guess.

                          session_start();
                          $_SESSION["access"] = $_POST["access"];
                          $access = $_SESSION["access"];
                          $clock = file_get_contents('random.php');
                          
                          if(isset($access)) {
                              echo "<html>";
                              displayaaphprandomimage($your_dirname, $your_alt_tag);
                              echo "</html>";
                          }
                          else {
                              header ("Location: index.php");
                          }
                          
                          
                          

                            zoobie:

                            Your original method was fine, there nothing wrong.

                            You have <?= ... ?> in random.php, so include("random.php") will print out your clock content. If it doesn't, its not neccessarily a problem with include, it could also be the random.php what has an error.

                            I also noticed there is a page redirect, comment it out just to make sure the clock banner does print out.

                            William

                              Well, the only way I've gotten it to work is with Daniel's suggestion.

                              ob_start();
                              include('yourfile.php');
                              $html = ob_get_contents();
                              ob_end_clean();
                              echo($html);
                              

                              I added his code into [url=http://]URL removed[/url] and it worked displaying a clock at the bottom and only using $html within the echo. Since this was just a test page, I then used the exact same code in my [url=http://]URL removed[/url] where it actually belongs and it stopped working again printing out $html but not actually displaying the clock.

                              Maybe you can only call on $html = ob_get_contents(); once?

                              Ugh...This is giving me a bad headache

                                What the code does is the following.

                                // Start caching browser output
                                ob_start();
                                
                                // Include file as normal
                                include('yourfile.php');
                                
                                // Retrive the output buffer and put it in a variable (in this case $html, but can be any name)
                                $html = ob_get_contents();
                                
                                // remove the code from the output buffer
                                ob_end_clean();
                                
                                // Print the contens of $html
                                echo($html);
                                

                                Now, this could be used any number of times in your page. But if you retreive two different pages and print them furhter down on your page, use two DIFFERENT variables. (Now this is pretty obvious, but I don't know exactly what you mean when you say you can only use $html once).

                                So this should work fine:

                                ob_start();
                                include('yourfile1.php');
                                $html1 = ob_get_contents();
                                ob_end_clean();
                                
                                ob_start();
                                include('yourfile2.php');
                                $html2 = ob_get_contents();
                                ob_end_clean();
                                
                                
                                echo($html1 . '</br>' .  $html2);
                                

                                  ic....nice...trying to get it working

                                  Can anyone see why my final code below isn't working using Daniel's method?

                                  <?php
                                  
                                  $now = time(); // Gets current server time 
                                  $open = strtotime('12 am'); // makes a midnight timestamp 
                                  $close = strtotime('1 am'); // makes a 1 am timestamp 
                                  
                                  ob_start();
                                  include('random.php');
                                  $html = ob_get_contents();
                                  ob_end_clean();
                                  
                                  if( ($now < $close) && ($now > $open) ) 
                                  { 
                                    // We're between the open times 
                                  
                                    echo '<html>
                                  <head>
                                  <meta name="robots" content="noindex,nofollow"> 
                                  <title>12 o\'Clock Midnight - Performing Arts Film & Video</title>
                                  </head>
                                  <body bgcolor="#000000" style="margin:0; padding:5px;overflow:auto;text-align:center;margin:0px; padding:0px">
                                  
                                  
                                  <div style="width: 100%">
                                  $html;
                                  </div>
                                  
                                  <div style="float:left; width: 20%;">
                                  <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="105" height="40" id="FlashClock2_univ" align="middle">
                                  <param name="allowScriptAccess" value="sameDomain" />
                                  <param name="movie" value="img/digital_red.swf" />
                                  <param name="quality" value="high" />
                                  <param name="bgcolor" value="#000000" />
                                  <param name="wmode" value="transparent" />
                                  <embed src="img/digital_red.swf" quality="high" bgcolor="#000000" width="105" height="40" name="clock_dig" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
                                  </object>
                                  </div>
                                  
                                  
                                  
                                  <div style="margin: auto">
                                  
                                  <form method="post" action="access.php"><input type="hidden" name="access" value="2006"><button style="width: 400px; height: 150px; border: 15px dotted lime; font: bold 50px courier new; color: lime; background-color: #000000; text-decoration: none; cursor: pointer" onclick="submit();">Access<br>Granted</button></form>
                                  
                                  </div>
                                  
                                  <div style="float:right; width: 20%;">
                                  <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="105" height="40" id="FlashClock2_univ" align="middle">
                                  <param name="allowScriptAccess" value="sameDomain" />
                                  <param name="movie" value="img/digital_red.swf" />
                                  <param name="quality" value="high" />
                                  <param name="bgcolor" value="#000000" />
                                  <embed src="img/digital_red.swf" quality="high" bgcolor="#000000" width="105" height="40" name="clock_dig" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
                                  </object>
                                  </div>
                                  </body>
                                  </html>'; 
                                  
                                  } 
                                  
                                  else 
                                  { 
                                    echo '<html>
                                  <head>
                                  <meta name="robots" content="noindex,nofollow"> 
                                  <title>12 o\'Clock Midnight - Performing Arts Film & Video</title>
                                  </head>
                                  <body bgcolor="#000000" style="margin:0; padding:5px;overflow:auto;text-align:center;margin:0px; padding:0px">
                                  
                                  <div style="margin:auto; width: 100%">
                                  <div>
                                  <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="400" height="400" id="FlashClock2_univ" align="middle">
                                  <param name="allowScriptAccess" value="sameDomain" />
                                  <param name="movie" value="img/fire_red.swf" />
                                  <param name="quality" value="high" />
                                  <param name="bgcolor" value="#000000" />
                                  <param name="wmode" value="transparent" />
                                  <embed src="img/fire_red.swf" quality="high" bgcolor="#000000" width="400" height="400" name="clock_dig" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
                                  </object>
                                  </div>
                                  </div>
                                  
                                    <div style="float:left; width: 20%;">
                                  <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="150" height="150" id="FlashClock2_univ" align="middle">
                                  <param name="allowScriptAccess" value="sameDomain" />
                                  <param name="movie" value="img/fire_red.swf" />
                                  <param name="quality" value="high" />
                                  <param name="bgcolor" value="#000000" />
                                  <param name="wmode" value="transparent" />
                                  <embed src="img/fire_red.swf" quality="high" bgcolor="#000000" width="150" height="150" name="clock_dig" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
                                  </object>
                                  </div>
                                  
                                  <div style="float:right; width: 20%;">
                                  <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="150" height="150" id="FlashClock2_univ" align="middle">
                                  <param name="allowScriptAccess" value="sameDomain" />
                                  <param name="movie" value="img/fire_red.swf" />
                                  <param name="quality" value="high" />
                                  <param name="bgcolor" value="#000000" />
                                  <embed src="img/fire_red.swf" quality="high" bgcolor="#000000" width="150" height=150" name="clock_dig" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
                                  </object>
                                  </div>
                                  
                                    <div style="text-align:center; width: 100%">
                                    <div style="width: 400px; height: 120px; margin: auto; border: 15px dotted #ff0000; cursor: pointer" title="Click to Access" onclick="history.go(0);">
                                    <span style="font: bold 50px courier new; color: red;">Access<br>Denied</span></div></div><br>
                                    <span style="font: bold italic 16px tahoma; color: #efcb89">Sorry...Access is only possible for 1 hour @ 12 o\'Clock Midnight EST.</span>
                                    </body>
                                    </html>'; 
                                  } 
                                  
                                  
                                  ?>
                                  

                                  Doesn't want to work when put into an argument.

                                  Thanks

                                    Tried your code and try to change it to

                                    ...
                                    
                                    echo '<html>
                                    <head>
                                    <meta name="robots" content="noindex,nofollow">
                                    <title>12 o\'Clock Midnight - Performing Arts Film & Video</title>
                                    </head>
                                    <body bgcolor="#000000" style="margin:0; padding:5px;overflow:auto;text-align:center;margin:0px; padding:0px">
                                    
                                    
                                    <div style="width: 100%">
                                    [B]' . $html . '[/B]
                                    </div>
                                    
                                    <div style="float:left; width: 20%;">
                                    
                                    ...
                                    

                                      Yep...That one did it. Now, it behaves as I planned. Thanks a lot.
                                      I was wondering what to put into the below code that tells it to go ahead with the html below the php. I've tried return; and return true; but it actually runs empty.

                                      <?
                                      if(isset($access)) {
                                      // what goes in here to tell it to continue to the html below?
                                      }
                                      else {
                                      	header ("Location: index.php");
                                      }
                                      ?>
                                      <html>
                                      <head>
                                      etc.
                                      

                                      Thanks again...Guess javascript could have accomplished the same less painfully...but I learned something.

                                      z

                                        umm... why not make it easy and do:

                                        if(!isset($access))
                                        {
                                          header('Location: index.php');
                                        }
                                        else
                                        {
                                        ?>
                                        <html>
                                        </html>
                                        <?php
                                        }
                                        ?>

                                        ~Brett

                                          Write a Reply...