mysql_select_db('ecosmar_products', $dbcnx);
$getcat=mysql_query("SELECT cat_name,item_start,catpage FROM cats ORDER BY item_start");
if(!$getcat){
echo("Cannot get categories. Error: ".mysql_error().".");
}else{
while($row=mysql_fetch_array($getcat)){
$catlong[]=$row['cat_name'];
$catshort[]=$row['item_start'];
$paffy=$row['catpage'];
if($paffy=="IAQ/catiaq.php"){
$kitty="catiaq.php";
}elseif($paffy=="wind_energy/catwe.php"){
$kitty="catwe.php";
}elseif($paffy=="Fuel_Cells/catfuelcell.php"){
$kitty="catfuelcell.php";
}else{
$kitty=$paffy;
}
$catpage[]=$kitty;
}
$countcat = count($catshort);
$i=0;
while($i < $countcat){
echo("");
$i=$i+1;
}
}//got cats
?>
|