Search code examples
htmlframeframeset

Need help in creating two columned website


I have to create a two columned website with menu at left and content on right. I have this index file-

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <title>Admin</title>
</head>
<frameset border="0" frameborder="0" rows="15%,*" framespacing="0">
    <frame src="atop.html">
    <frameset cols="22%,*">
        <frame src="amain.html" />
        <frame src="ad.php" name="content" id="content"/>
    </frameset>
</frameset>
</html>

Where atop.html is-

<!DOCTYPE HTML>
<html>
<body>
<center><h1><u>Admin</u></h1></center>
</body>
</html>

and amain.html is-

<!DOCTYPE html>
<html>
<body>
What do you want to do?<br />
<a target="content" href="ad.php?q=csr">CREATE STUDENT RECORD</a><br />
<a target="content" href="ad.php?q=dasr">DISPLAY ALL STUDENTS RECORD</a><br />
<a target="content" href="ad.php?q=dstr">DISPLAY SPECIFIC STUDENT RECORD</a><br />
<a target="content" href="ad.php?q=msr">MODIFY STUDENT RECORD</a><br />
<a target="content" href="ad.php?q=dsr">DELETE STUDENT RECORD</a><br />
<a target="content" href="ad.php?q=cb">CREATE BOOK</a><br />
<a target="content" href="ad.php?q=dab">DISPLAY ALL BOOKS</a><br />
<a target="content" href="ad.php?q=dsb">DISPLAY SPECIFIC BOOK</a><br />
<a target="content" href="ad.php?q=mb">MODIFY BOOK</a><br />
<a target="content" href="ad.php?q=db">DELETE BOOK</a><br />
<a target="content" href="ad.php?q=cp">CHANGE PASSWORD</a><br />
</body>
</html>

and ad.php is-

<html>
<body>
<?php
$q=$_GET['q'];
echo $q;
?>
</body>
</html>

The main problem is that it is not working correctly. Is there any mistake in the code, please tell me. I will be very thankful to you!!


Solution

  • Problem solve by just renaming ad.php to asds.php