<?php
include "../includes/config.php";
include "../includes/session.php";
include "../includes/functions.php";

$metaid	= $_POST['meataid'];

			$vTitle 		= '';
			$vKeywords		= '';
			$vDescription	= '';

if($metaid!='')
{
	$sql_meta= "SELECT * from ".$tableprefix."metatags where nId ='".$metaid."'  ";

	$rs_meta_tags = mysql_query($sql_meta) or die(mysql_error());
	
	$metaRows	 =mysql_num_rows($rs_meta_tags);
	
	$metaRowsObj = mysql_fetch_object($rs_meta_tags);
	
	if($metaRows>0)
	{
		$vTitle	= stripslashes($metaRowsObj->vTitle);
		$vKeywords	= stripslashes($metaRowsObj->vKeywords);
		$vDescription	= stripslashes($metaRowsObj->vDescription);
		
	}
	
	echo json_encode(array("metatitle"=>$vTitle,"metakeyword"=>$vKeywords,"metadescription"=>$vDescription));
			
	exit();

}

?>