include_once('../common.php'); ?> if($game_id != "") { if($_SESSION[ss_mb_id] != "") { include_once('../include/dbfunc.inc'); openMySql("KIDSZZANG"); //이미 존재하는지 체크하기 $Query = "select count(*) from save_game where user_id='$_SESSION[ss_mb_id]' and game_id='$game_id' and menu='$menu'"; $res = mysql_query($Query); $row = mysql_fetch_row($res); //게임 저장하기 if($row[0] > 0) { echo ""; die(); } else { $Query = "insert into save_game set game_id='$game_id',name='$name',menu='$menu',thumb='$thumb',user_id='$_SESSION[ss_mb_id]',reg_date=NOW()"; mysql_query($Query); echo ""; } } else { echo ""; } die(); closeMySql(); ?> } ?>