<?
if($id){
mysql_connect("localhost", "temp", "password")
or DIE("Unable to connect to database");
@mysql_select_db("test") or die("Unable to select database");
$result = mysql_query("select * from links where catid='$id'");
$row = mysql_fetch_array($result);
?>
<head>
</head>
<frameset rows="12%,1*">
<frame name=top src=top.php scrolling=no noresize>
<frame name=bottom src=<? PRINT "$url"; ?>>
<noframes>
<body>
<div class=Section1>
<p>This page uses frames, but your browser doesn't support them. </p>
</div>
</body>
</noframes>
</frameset>
<?
}
else { ?>
<HEAD>
<TITLE>Oh, we hit a problem!</TITLE>
</HEAD>
<BODY>
<br>Sorry, we have a problem!<br>
<? } ?>
</BODY>
I used link.php?id=0 although the query seems to work , when i click the link it passes and shows the "else" bit???
Thanks in advance,
Paul