sub cart_settings { $id = param('id'); $sth = $dbh->prepare("SELECT id,name,parent,description,view_cats_prod FROM category WHERE id = '$id'"); $sth->execute or die $dbh->errstr; ($ided,$name,$parent,$des,$view) = $sth->fetchrow_array; print qq~
Category
Short Description
~; if($view eq "yes") { print qq~ ~; } else { print qq~ ~; } print qq~ Have all of the categories products on this page
~; } sub cart_upsettings { $id = param('id'); if(! param('cat') || ! param('des')) { inerror("You didn't enter a category or description"); } $cat = param('cat'); $des = param('des'); if(param('page') eq "yes") { $dbh->do("UPDATE category SET name='$cat' AND view_cats_prod='yes' AND description='$des' WHERE id='$id'") or die $dbh->errstr; } else { $dbh->do("UPDATE category SET name='$cat' AND view_cats_prod='no' AND description='$des' WHERE id='$id'") or die $dbh->errstr; } print qq~

$cat, settings has been updated

~; if($id) { print "Return to Manage Categories"; } else { print "Return to Manage Categories"; } }