$db=mysql_pconnect ("localhost", "parismav_guest", "GuestPass333") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db("parismav_huilingDB");
//$cat = stripslashes($_GET['category']);
$cat = $_GET['category'];
//$query = "select * from HLartworks where type=$cat order by year desc;";
//echo ($cat);
if (($cat!="abstract")&&($cat!="cards")&&($cat!="classical")&&($cat!="portrait")&&($cat!="still")&&($cat!="landscape"))
die('invalid url!');
$query = "select * from HLartworks where type='$cat' order by year desc";
$result = mysql_query($query);
$num_results = mysql_num_rows($result);
for ($i=0; $i<$num_results; $i++)
{
$piece[$i] = mysql_fetch_array($result);
} ?>
echo ' ';
echo '';
echo '';
//abstract
if ($cat=='abstract') echo '';
else echo '';
//cards
if ($cat=='cards') echo '';
else echo '';
//classical chinese
if ($cat=='classical') echo '';
else echo '';
//landscape
if ($cat=='landscape') echo '';
else echo '';
//portrait
if ($cat=='portrait') echo '';
else echo '';
//still life
if ($cat=='still') echo '';
else echo '';
//echo '';
//echo '';
?>