<?
function meta_title($pids)
{
	if($pids!='')
	{
	$pids=substr($pids,0,-1);
	$res=mysql_query("select pname,bid_price from t123go_product where pid in($pids) and pid!='' order by rand() limit 1");
   if(mysql_num_rows($res)>0)
   $rec=mysql_fetch_array($res);
   return $rec[0];
  }
}

function meta_keyword($pids)
{
if($pids!='')
	{
	$pids=substr($pids,0,-1);
	$res=mysql_query("select pname from t123go_product where pid in($pids) and pid!='' ");
	  if(mysql_num_rows($res)>0)
	  {
		$str="";
		while($rec=mysql_fetch_array($res))
		  $str.=strip_tags($rec[0]).",";
	  }  
	$newstr=str_replace(" ",",",$str); 
	return $newstr;
	}
}

function meta_description($pids)
{
if($pids!='')
	{
	$pids=substr($pids,0,-1);
	$res=mysql_query("select description from t123go_product where pid in($pids) and pid!='' order by rand() limit 1");
	  if(mysql_num_rows($res)>0)
	  $rec=mysql_fetch_array($res);
	  return strip_tags(substr($rec[0],0,200));
	 } 
}

?>