Links Types select ( "select * from business_type where parent=0 order by type" ); //$db->print_last_query(); while ( $row = $db->get_row ( $res, 'MYSQL_BOTH' ) ) { ?>

Type

Type:

Parent Type:

"; ?> "; ?>
select ("SELECT type From business_type WHERE type='{$type}'") or die('error in selection.'); $count=mysql_num_rows($select_cat); if($count==0) { $id = $db->insert_sql ( "INSERT INTO business_type (type,parent) VALUES('".ucfirst($type)."','{$_POST ['parent']}')" ); $msg="Type inserted"; } else{ $msg="$type Already Exist"; } //$db->print_last_query(); print ""; exit (); } } if (isset ( $_POST ['bt_update'] )) { echo "hiee"; $id = $db->update_sql ( "update `business_type` set `type`='" . $_POST ['type'] . "',`parent`='" . $_POST ['parent'] . "' where typeid=" . $_GET ['type'] ); //$db->print_last_query(); echo "hiee"; print ""; } if (isset ( $_GET ['del'] )) { $id = $db->delete ( "delete from business_type where typeid=" . $_GET ['del'] ); //$db->print_last_query(); print ""; } ?>