Tamil Agarathi"; $eng=$_POST['eng']; $tam=$_POST['tam']; $eng=strtolower(preg_replace(array('/[^A-Za-z0-9\s\.]/','/\s+/'),array('',' '),$eng)); $tam=strtolower(preg_replace(array('/[^A-Za-z0-9\s\.]/','/\s+/'),array('',' '),$tam)); $type=$_POST['type']; $submit=$_POST['submit']; if($submit=="Save"){ if(strlen($eng)>2 ){ $qry="SELECT * FROM engtam WHERE eng='$eng'"; mysql_query("SET NAMES 'utf8'"); $rs=mysql_query($qry); $totalRecords = mysql_num_rows($rs); if($totalRecords<1){ $qry="INSERT INTO engtam(eng,tam,type) VALUES('$eng','$tam',$type)"; //echo $qry; mysql_query("SET NAMES 'utf8'"); $rs=mysql_query($qry); if(strlen($tam)<2 )$err.=" No tamil definition but "; $err.= "You word $eng has been added"; }else{ $err.="Already available"; } }else{ $err.= "Please provide valid datas"; } } if(strlen($err)>1) echo "MSG/ERR: $err"; ?>
English
Tamil
Type