J

alert함수 이용하여 post로 넘길때 안되는거 수정

회원가입할때 에러가 나면 회원가입폼으로 넘어가는데 거기에서 agree값이 없어서

회원가입 승인 페이지로 넘어가버립니다. post로 넘겼으나 안되어서 

alert.php를 수정했습니다.

 

47줄 다음에 있는 내용을 아래와 같이 수정해주세요.

 

<script>
alert("<?php echo strip_tags($msg); ?>");
//document.location.href = "<?php echo $url; ?>";
<?php if ($url && !$post) { ?>
document.location.replace("<?php echo str_replace('&', '&', $url); ?>");
<?php } else if(!$url && !$post) { ?>
//alert('history.back();');
history.back();
<?php } ?>
</script>

<?php if($post) { ?>
<form method="post" name="fpost" action="<?php echo $url ?>">
<?php
foreach($_POST as $key => $value) {
    if(strlen($value) < 1)
        continue;

    if(preg_match("/pass|pwd|capt|url/", $key))
        continue;
?>
<input type="hidden" name="<?php echo $key ?>" value="<?php echo $value ?>">
<?php
}
?>
<script>
document.fpost.submit();
</script>
</form>
<?php } else { ?>
<div class="btn_confirm">
    <a href="<?php echo $url ?>">돌아가기</a>
</div>
<?php }?>

|
댓글을 작성하시려면 로그인이 필요합니다.

그누보드5 팁자료실

+
제목 글쓴이 날짜 조회
7년 전 조회 5,968
7년 전 조회 7,673
7년 전 조회 1.1만
7년 전 조회 8,760
7년 전 조회 7,943
7년 전 조회 4,834
7년 전 조회 8,192
7년 전 조회 5,628
7년 전 조회 1.2만
7년 전 조회 5,110
7년 전 조회 4,370
7년 전 조회 6,231
7년 전 조회 1.2만
7년 전 조회 4,534
7년 전 조회 4,225
7년 전 조회 6,236
7년 전 조회 3,876
7년 전 조회 2만
7년 전 조회 4,640
7년 전 조회 4,373
7년 전 조회 5,741
7년 전 조회 6,273
7년 전 조회 1.4만
7년 전 조회 9,878
7년 전 조회 4,573
7년 전 조회 6,161
7년 전 조회 4,794
7년 전 조회 4,948
7년 전 조회 5,565
7년 전 조회 5,322