<?php
function cre($type,$value,$uid){
	if($type == '+'){
		$value = crevalue + $value;
	}elseif($type == '-'){
		$value = crevalue - $value;
	}
	 $sql="UPDATE user SET crevalue='{$value}' WHERE id ='{$uid}'";
	 mysql_query($sql);
	 
	 return $value;
}
?>