It could be a line before that, The numbers are not always correct LOL
</head>
<body>
<div class="wrapper">
<div class="title">
News Archive
</div>
<div class="content" align="center" style="border-bottom: 1px #eee solid;">
Change category:
<select onchange="window.location = '?cat=' + this.value">
<option>Please select...</option>
<?php
the whole code is:$query = mysql_query( "SELECT * FROM news_categories" );
?
<?php
$query = $db->query( "SELECT * FROM news_categories" );
while( $array = $db->assoc( $query ) ) {
echo "<option value=\"{$array['id']}\">";
echo $array['name'];
echo "</option>";
}
?>
the whole code is:
Code:<?php $query = $db->query( "SELECT * FROM news_categories" ); while( $array = $db->assoc( $query ) ) { echo "<option value=\"{$array['id']}\">"; echo $array['name']; echo "</option>"; } ?>
<?php
$query = mysql_query("SELECT * FROM news_categories ORDER BY `id` DESC");
{
echo '<option value=\"{$array['id']}\"> ';
echo $array['name'];
echo '</option>';
}
while($row = mysql_fetch_array($query)){
}
// Over here, it will show the content you choose...
?>
thanks it worked :]Code:<?php $query = mysql_query("SELECT * FROM news_categories ORDER BY `id` DESC"); { echo '<option value=\"{$array['id']}\"> '; echo $array['name']; echo '</option>'; } while($row = mysql_fetch_array($query)){ } // Over here, it will show the content you choose... ?>