0

kategori_berita.php

<?php
 
 
	 include('koneksi.php');
 
	$_REQUEST['catid'] = isset($_POST['catid']) ? $_POST['catid'] : '';
 
	$result = mysql_query("SELECT * FROM kategori_berita") or die(mysql_error());
	echo '<ul>';
	while ($data=mysql_fetch_array($result)){
		if ($_REQUEST['catid']==$data['id'])
			echo '<li>'.$data['kategori'].'</li>';
		else
			echo '<li><a href="./?catid='.$data['id'].'">'.$data['kategori'].'</a><br/></li>';
	}
	echo '</ul>';
?>

</div>

I am trying to print bullet button list for each kategori:

if ($_REQUEST['catid']==$data['id'])
			echo '<li>'.$data['kategori'].'</li>';
		else
			echo '<li><a href="./?catid='.$data['id'].'">'.$data['kategori'].'</a><br/></li>';

I wonder why I do not see the bullet button, only the kategori text?

Edited by davy_yg: n/a

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

Try replacing line 10 with the following:

echo '<ul style="list-style-type: circle;">';

It may be just a simple css problem which is hiding the bullets.

0

Well this is the whole code:

kategori_berita.php

<link href="../style.css" rel="stylesheet" type="text/css" />


<div id="kategori">
	<div class="headerStyle">
		<div style="padding:4px 0px;">Kategori Berita</div>
	</div>
    
    
 <?php
 
 
	 include('koneksi.php');
 
	$_REQUEST['catid'] = isset($_POST['catid']) ? $_POST['catid'] : '';
 
	$result = mysql_query("SELECT * FROM kategori_berita") or die(mysql_error());
	echo '<ul style="list-style-type: circle;">';
	while ($data=mysql_fetch_array($result)){
		if ($_REQUEST['catid']==$data['id'])
			echo '<li>'.$data['kategori'].'</li>';
		else
			echo '<li><a href="./?catid='.$data['id'].'">'.$data['kategori'].'</a><br/></li>';
	}
	echo '</ul>';
?>

</div>

style.css

#kategori {
	z-index: 3;
	height: 200px;
	width: 180px;
	align: left;
	position: relative;
	margin-top: 5px;
	background-color: yellow;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 13px;
}

It still does not work. I just add the suggestion.

Edited by davy_yg: n/a

This topic has been dead for over six months. 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.