PDA

Click to See Complete Forum and Search --> : What is wrong with this script?


Allen Schoessler
Mar 30th, 2004, 03:33 PM
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....



<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>

";

?>

kows
Mar 30th, 2004, 05:12 PM
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.
<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>