0

news_manager.php

//LOAD KATEGORI
			$result = mysql_query("SELECT * FROM kategori_berita ORDER BY kategori ASC") or die(mysql_error());
		?>
		Pilih Kategori Terlebih dahulu 	<select name="kategori" onchange="submit();">
										<?php
										if (empty($_REQUEST['kategori'])) echo '<option value="" selected="selected">--Kategori--</option>';
										while ($data=mysql_fetch_array($result)){
											?><option <?php if ($_REQUEST['kategori'] == $data['id']) echo 'selected="selected"' ?> value="<?php echo $data['id']; ?>"><?php echo $data['kategori']; ?></option>
										<?php
											
										}
										?>							
									</select><br/>

The above code suppose to show me list of kategory in the drop down box.

Yet this is what's appears:

Pilih Kategori Terlebih dahulu --Kategori--

When I scroll down --Kategori-- it does not show me anything else, while I already will in the column field through phpmyadmin.

Any clue?

3
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by pritaeas
0

The table name: kategori_berita and the fields name: id (underlined) and kategori.

0

Check the HTML output of your page, are your database values in there ? Then you have a typo somewhere in your file (unclosed tag perhaps).

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.