tabel åbnes i main - frameset ??
Jeg har følgende kode, der henter en tabel fra en database, men jeg vil godt have den loadet ind i et frameset til siden ved navn \"main\".Men hvor i koden skal jeg tilføje \"target=main\"
min kode ser sådan ud :
<?php include (\"dbconnect.php\");?>
<h2> View my guest Book!!!</h2>
<?php
$result = mysql_query(\"select * from guestbook\") or die (mysql_error());
echo \"<table border = 1>\\n\";
while ($row = mysql_fetch_array($result))
{
echo \"<tr align=center>\\n\";
echo \"<td>\";
echo \" <b>Name: </b>\";
echo \"</td>\";
echo \"<td>\";
echo $row[\"name\"];
echo \"</td>\";
echo \"</tr>\";
echo \"<tr align=center>\\n\";
echo \"<td>\";
echo \" <b>Location: </b>\";
echo \"</td>\";
echo \"<td>\";
echo $row[\"location\"];
echo \"</td>\";
echo \"</tr>\";
echo \"<tr align=center>\\n\";
echo \"<td>\";
echo \" <b>Email: </b>\";
echo \"</td>\";
echo \"<td>\";
echo $row[\"email\"];
echo \"</td>\";
echo \"</tr>\";
echo \"<tr>\";
echo \"<td>\";
echo \"</td>\";
echo \"</tr>\";
}
echo \"</table>\";
mysql_free_result($result);
?>
<h2><a href=\"sign.php\">Sign my guestbook!!</a></h2>
Og mit frameset ser sådan ud :
<html><head>
<frameset rows=\"60,*\">
<frame name=\"top\" src=\"logo.htm\" marginwidth=\"10\" marginheight=\"10\" scrolling=\"auto\" frameborder=\"no\">
<frameset cols=\"*,630,*\">
<frame name=\"main\" src=\"forside.htm\" marginwidth=\"10\" marginheight=\"10\" scrolling=\"auto\" frameborder=\"no\">
<frame name=\"side1\" src=\"menu.htm\" marginwidth=\"10\" marginheight=\"10\" scrolling=\"auto\" frameborder=\"no\">
<frame name=\"side2.htm\" src=\"links.htm\" marginwidth=\"10\" marginheight=\"10\" scrolling=\"auto\" frameborder=\"no\">
</frameset>
</frameset>
<noframes>
</noframes>
</head></html>