<?php
include("../db_connection.php");

if($_POST['vals']=="favourite")
{
	$sql=mysql_query("insert into tbl_favorite(ads_id,userid,date_time)values('".$_POST['ids']."','".$_SESSION['cid']."',now())");
}
else
{
	$delete=mysql_query("delete from tbl_favorite where ads_id='".$_POST['ids']."' and userid='".$_SESSION['cid']."'");
}
?> 