Results 1 to 2 of 2

Thread: What is wrong with this script?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2000
    Location
    At my computer
    Posts
    187

    What is wrong with this script?

    The idea is to have a script that I can call like this:

    http://www.diamindteam.com/new/link.php?p=http://www.hotmail.com

    ... and it will display two frames: menu.htm in the top, and hotmail.com in the bottom. Below is my script, I can't for the life of me figure out why it won't work....


    Code:
    <html>
    
    <head>
    <meta http-equiv=Content-Type content=text/html; charset=iso-8859-1>
    <title>DiaMinds International</title>
    </head>
    
    <?php
    
    $p=$_GET['p'];
    
    echo "
    
    <frameset framespacing=0 border=false rows=85,* frameborder=0>
      <frame name=header scrolling=no noresize target=main src=menu.htm>
      <frame name=main src=$p scrolling=auto>
      <noframes>
      <body>
      <p>This page uses frames, but your browser doesn't support them.</p>
      </body>
      </noframes>
    </frameset>
    </html>
    
    ";
    
    ?>
    Last edited by Allen Schoessler; Mar 30th, 2004 at 04:39 PM.
    - Visual Basic 6.0
    - Windows XP Home

  2. #2
    PowerPoster
    Join Date
    Sep 2003
    Location
    Edmonton, AB, Canada
    Posts
    2,629
    Just made this.. reworked some of your HTML because I didn't like the way it looked.. but try adapting it to yours or just changing some of it to see if it works.
    PHP Code:
    <html>
      <head>
        <title>http frames</title>
      </head>
    <?
      if(getenv("QUERY_STRING") == "menu"){
    ?>
      <body bgcolor="#000000" text="#ffffff" topmargin="0" bottommargin="0">
        <center><b>menu thing</b></center>
      </body>
    <?
      }else{
        $page = (isset($_GET['p']) && $_GET['p'] != "") ? $_GET['p'] : "http://www.gamersepitome.net";
    ?>
      <frameset rows="25,*" framespacing="0" frameborder="0">
        <frame name="head" scrolling="no" src="<?=getenv("PHP_SELF") . "?menu";?>" noresize>
        <frame name="main" src="<?=$page;?>" scrolling="auto">
      </frameset>
    <? } ?>
    </html>
    Like Archer? Check out some Sterling Archer quotes.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width