$m_id=$_GET[m_id];
$act_id=$_GET[act_id];
$act_count=1;
$result = mysql_query("select * from act_count_stam where act_count_id='$act_count_id' and m_id='$m_id'") or die ("Err Can not to result");
$num= mysql_num_rows($result);
$dbarr = mysql_fetch_array($result) ;
$act_count_id=$dbarr['act_count_id'];
if($act_count_id && $m_id == ""){
$sql1="insert into act_count_stam values('','$act_id','$m_id','$act_count')";
$result1=mysql_db_query($dbname,$sql1);
} else
{
$sql2="update act_count_stam set act_count_up='$act_count' where act_count_id='$act_count_id'";
$result2=mysql_db_query($dbname,$sql2);
}