echo 후 이동을 할수 없을까요?
본문
php 왕왕초보입니다.
폼을 ajax로 내용을 받은 후 aaa.php안에 내용이 들어가는데요.
echo "asdf";
} else {
echo "asdfg"
}
로 되어있는데
asdf가 버튼 클릭후 나오는 alert 문구인데.. 문구 필요없이 바로 새창으로 넘겨버릴순 없을까요?
코드는...
<?
require_once "common/db.connect.php";
$check = new stdClass;
$check->name = $_POST["name1"];
$check->call = $_POST["call1"];
$check->type = $_POST["type1"];
$check->ip = $_SERVER["REMOTE_ADDR"];
$db = new DB();
$dload = $db->query("select count(*) from bod_cost where bod_ip = '$check->ip' and date(bod_date) = date(now())");
$dload->execute();
$check->fetch = $dload->fetch(PDO::FETCH_NUM);
if(empty($check->fetch[0])){
$indb = $db->prepare("insert into bod_cost (
bod_name,
bod_phone,
bod_type,
bod_ip,
bod_date
) VALUES (
'$check->name',
'$check->call',
'$check->type',
'$check->ip',
now()
)");
$indb->execute();
echo "신청하신 문의가 접수되었습니다.";
} else {
echo "오늘은 더 이상 접수할 수 없습니다.";
}
unset($db);
?>
입니다.
!-->
답변을 작성하시기 전에 로그인 해주세요.