hi, im an amateur at php.. just having problems with my dissertation.. i have made my database using phpmyadmin, im using php triad, i found this was working for me, neways, im trying to pull the data out of my database, i have a text book im following etc.. but.. having real trouble at this scrip
[CODE] <?php
//connect database
$conn = mysql_connect (“localhost”, “”, “”)
or die(mysql_error());
mysql_select_db(“tiles”,$conn);
$display_block = “Tiles Categories</h1>
<P>Select a category to see items</P>”;
//show categories first
$get_cats = “select id, cat_title, cat_desc from
categories order by cat_title”;
$get_cats_res = mysql_query($get_cats) or die(mysql_error());
if (mysql_num_rows($get_cats_res) < 1) {
$display_block = “<P><em> Sorry , no categories to browse. </em></p>”;
} else {
While ($cats = mysql_fetch_array($get_cats_res)) {
$cat_id = $cats[id];
$cat_title = strtoupper(stripslashes($cats[cat_title]));
$cat_desc = stripslashes ($cats[cat_desc]);
$display_block .= “<p><strong><a
href=”$_SERVER[PHP_SELF]?cat_id=$cat_id”>$cat_title</a></strong>
<br>$cat_desc</p>;
if ($_GET[cat_id] == $cat_id) {
//get items
$get_items = “select id, item_title, item_price
from items where cat_id = $cat_id
order by item_title”;
$get_items_res = mysql_query($get_items) or die(mysql_error());
if (mysql_num_rows($get_items_res) < 1) {
$display_block = “<P><em>Sorry, no items in
this category.</em></p>”;
} else {
$display_block .= “<ul>;
while ($items = mysql_fetch_array($get_items_res)) {
$item_id = $items[id];
$item_title = stripslashes($items[item_title]));
$item_price = $items[item_price];
$display_block .= “<li><a
href=”showitem.php?item_id=$item_id”.$item_title</a>
</strong> ($$item_price)”;
}
$display_block .= “</ul>”;
}
}
}
}
?>
<HTML>
<HEAD>
<TITLE> Tiles Library</TITLE>
</HEAD>
<BODY>
<?php echo $display_block; ?>
</BODY>
</HTML>
mozilla says its a error on line 30, iv checked everything.. really dont knw what the prblem is.. if anyone could have a quick look it would be appreciated. thanx