-
Need Help.
Heyy all i have this nav.php..
now i want to make it ajax i know how but when eva i do it it dosent show the website :S
okay original code..:
PHP Code:
<table width="150">
<?php
database_connect();
$query = "SELECT * from content
WHERE status = 1
ORDER by position;";
$error = mysql_error();
if (!$result = mysql_query($query)) {
print "$error";
exit;
}
while($rij = mysql_fetch_object($result)){
$title = $rij->title;
$id = $rij->id;
print("<tr>
<td>
<a href=\"page.php?id=$id\" target=\"centerframe\"><strong>$title</strong></a>
</td>
</tr>
");
}
?>
</table>
and what im trying to do is this:
PHP Code:
<table width="150">
<?php
database_connect();
$query = "SELECT * from content
WHERE status = 1
ORDER by position;";
$error = mysql_error();
if (!$result = mysql_query($query)) {
print "$error";
exit;
}
while($rij = mysql_fetch_object($result)){
$title = $rij->title;
$id = $rij->id;
print("<tr>
<td>
<a href=\"javascript:ajaxpage('page.php?id=$id\', 'mainarea');"><strong>$title</strong></a>
</td>
</tr>
");
}
?>
</table>
WHAT i mean by blank and it dosent show = http://fallin-angels-fanatic.org/
?? please respond i need to get it working ??
-
It shows, but is there any need
To Type Like This Everywhere On Your Content?
-
PHP Code:
<table width="150">
<?php
database_connect();
$query = "SELECT * FROM `content`
WHERE `status` = '1'
ORDER BY `position`;";
$error = mysql_error();
if (!$result = mysql_query($query))
{
die $error;
exit; // Not needed really.
}
while( $rij = mysql_fetch_objects( $result ) )
{
$title = $rij->title;
$id = $rij->id;
print("<tr>
<td>
<a href=\"javascript:ajaxpage('page.php?id=". $id ."', 'mainarea');\"><strong>". $title ."</strong></a>
</td>
</tr>
");
}
?>
</table>
-
invent it dosent work sorry :(
-
have you included the functions files for your ajaxpage() functions?