0

I hate using frames, i dont know why but i have never put a frame in any of my website. Its like a page in a page, eating excessive bandwidth!! What do you think of frames? Do you use them? What for?

3
Contributors
2
Replies
3
Views
9 Years
Discussion Span
Last Post by ghostsquad
0

yes and no. I use frames using php to SAVE bandwidth and excess coding.

I have my index.php in the root directory, and my "pages" in a pages sub directory.

in index look something like this:

<body>

<div id="nav">
  <ul>
    <li><a href="/index.php?page=home">Home</a></li>
    <li><a href="/index.php?page=contact">Contact</a></li>
    <!-- etc -->
  </ul>
</div>

<div id="content">

  <?php
  if (array_key_exists('page', $_GET)){
     $cur_page = $_GET['page'];
  }
  else {
     $cur_page = 'home';
  }
  //include appropriate file
  if (isset($cur_page)){
     require_once 'lib/pages/'.$cur_page.'.php';
  }
  else {
     echo "uh oh, for some reason the variable cur_page is not set";
  }
  ?>

</div>

</body>

this doesn't use html frames, but DOES use the idea of a page inside of a page. I only have to include javascript files, css files, put code in to open and close the database connection on index.php. Also, the header, footer, sidebars, etc need to be index.php

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.