Frames and PHP

I’m making a login system project and I downloaded from here http://www.plus2net.com


$rt=mysql_query("insert into tbl_login(id,userid,ip,tm) values('$_SESSION[id]','$_SESSION[userid]','$ip','$tm')");
echo mysql_error();
       print "<script>";
       print " self.location='test.php';";
       print "</script>";

My problem is the test.php is a framesets and the require “bottom.php” is not working.


<frameset rows="200,*" frameborder="0" border="0" framespacing="0">
  <frame name="topNav" src="top_nav.html">
<frameset cols="200,*" frameborder="0" border="0" framespacing="0">
	<frame name="menu" src="" marginheight="0" marginwidth="0" scrolling="auto" noresize>
	<frame name="content" src="content.html" marginheight="0" marginwidth="0" scrolling="auto" noresize>

<noframes>
<p>This section (everything between the 'noframes' tags) will only be displayed if the users' browser doesn't support frames. You can provide a link to a non-frames version of the website here. Feel free to use HTML tags within this section.</p>
</noframes>
<?php
require "bottom.php";
?>
</frameset>
</frameset>

Is there any part of my frame that the require function will work?
another question, is it possible to make a link that will return to its default frame page (my homepage) when clicked?

Any help is greatly appreciated. THank you.