$sumpoint=(int)$member[mb_point]-(int)$_POST[point];
if((int)$_POST[point]=="9800"){
$timestamp = strtotime("+12 days");
$timestamp2=date("Y-m-d H:i:s", $timestamp);
$enddate=$_POST[enddate]+$timestamp2;
}else if((int)$_POST[point]=="19800"){
$timestamp = strtotime("+1 months");
$timestamp2=date("Y-m-d H:i:s", $timestamp);
$enddate=$_POST[enddate]+$timestamp2;
}else if((int)$_POST[point]=="45800"){
$timestamp = strtotime("+3 months");
$timestamp2=date("Y-m-d H:i:s", $timestamp);
$enddate=$_POST[enddate]+$timestamp2;
}else if((int)$_POST[point]=="79800"){
$timestamp = strtotime("+6 months");
$timestamp2=date("Y-m-d H:i:s", $timestamp);
$enddate=$_POST[enddate]+$timestamp2;
}else{
}
if($_POST[point] <= $member[mb_point]){
echo $sql = " update $g5[member_table] set mb_point='$sumpoint', mb_7='$_POST[startdate]', mb_8='$enddate' where mb_id='$member[mb_id]'";
//exit;
$row = sql_query($sql);
mysql_error();
//die( "mysql connect error : " . mysql_error() );
//exit;
}else{
alert("포인트를 충전하세요");
}
참고했는데 값이 4040 이렇게 합쳐지네요