הפלט:
PHP קוד:
<script type="text/javascript" src="drop.js"></script>
<link href="drop.css" rel="stylesheet" type="text/css" />
<table class="menu">
<tr>
<td>
| <a href="pages.php?id=1">Blah blah blah</a> | <br>
</td><td onmouseover="showHideTable('1')" onmouseout="showHideTable('1')">
<div class="menu" id="1">
</div></td></td> <td>
| <a href="pages.php?id=2">Only test for page with cat</a> | <br>
</td><td onmouseover="showHideTable('2')" onmouseout="showHideTable('2')">
<div class="menu" id="2">
<a href="page.php?id="1">Hehe</a><br></div></td></td></tr>
</table>
מהקוד:
PHP קוד:
include "connect.php";
$query = mysql_query("SELECT * FROM `pages`");
while($rr = mysql_fetch_array($query)){
$id = $rr['id'];
$name = $rr['name'];
echo ' <td>
| <a href="pages.php?id='.$id.'">'.$name.'</a> | <br>
</td>';
$query2 = mysql_query("SELECT * FROM `category` WHERE `cid` = ".$rr['id']);
echo <<<HTML
<td onmouseover="showHideTable('$id')" onmouseout="showHideTable('$id')">
<div class="menu" id="$name">
HTML;
while($rr2 = mysql_fetch_array($query2)){
$name2 = $rr2['name'];
$id2 = $rr2['id'];
echo <<<HTML
<a href="page.php?id="$id2">$name2</a><br>
HTML;
}
echo <<<HTML
</div></td></td>
HTML;
}
התפריט לא נפתח בכלל, זה לפי התפריט שיש ב WEBMASTER וזה היה אמור להפתח , מה הבעיה?