window.alert('아이디가 존재하지 않습니다.');history.go(-1)"; exit; } $conn = mysql_connect($sqlhost,$sqluser,$sqlpwd) or die("db 서버 연걸오류"); mysql_select_db($sqldb, $conn); $que ="select * from userinfo where id='$id'"; $result = mysql_query($que, $conn); if(!$result) { echo ""; exit; } $chk =mysql_num_rows($result); if(!$chk) { echo ""; exit; } $row = mysql_fetch_array($result); $pwd2 = $row["pwd"]; $name = $row["name"]; $jumin1 = $row["jumin1"]; $jumin2 = $row["jumin2"]; $mail = $row["mail"]; if(intval($jumin2[0]) == 1 || intval($jumin2[0]) == 3) $sex = "male"; else $sex = "female"; if(intval($jumin2[0]) == 1 or intval($jumin2[0]) == 2) $year = intval("19" . $jumin1[0] . $jumin1[1]); else $year = intval("20" . $jumin1[0] . $jumin1[1]); $age = date("Y") - $year +1; if($pwd != $pwd2) { echo ""; exit; } else { $que = "update userinfo set lastdate=now() where id='$id'"; $result = mysql_query($que, $conn); setcookie("loginid", $id, 0, "/"); setcookie("loginname", $name, 0, "/"); setcookie("loginmail", $mail, 0, "/"); setcookie("loginsex", $sex, 0, "/"); } if(trim($replace_url)) { echo ""; } else { echo ""; } mysql_close($conn); exit; } if($xopt == "logout") { setcookie("loginid", "", 0, "/"); setcookie("loginname", "", 0, "/"); setcookie("loginmail", "", 0, "/"); setcookie("loginsex", "", 0, "/"); if(trim($replace_url)) { echo ""; } else { echo ""; } mysql_close($conn); exit; } ?>