<?php
include("lib/Config.php");
extract($_REQUEST);
if($str=='addnew'){
$sel=executeQuery("select * from category where `".$fid."`='".$val."'");	
}if($str=='edit'){
$sel=executeQuery("select * from category where `".$fid."`='".$val."' and id!='".$iid."'");
}
if($fid=='product_id'){$strr='Product Id';}else if($fid=='seo'){$strr='URL';}
if(totalRecords($sel)>0){echo $strr." already Exists";}
?>