- 5
- 260578
- 조회 수 613
1 2 3 4 5 6 7 8 | <form method= "post" action= "going.php" > <legend><h3>Step 1</h3></legend> <fieldset> <p>아이디: <input type= "text" value= "'.$id.'" name= "id" disabled></p> <input type= "submit" value= "다음 단계로" > <span id= "chkt" style= "color: gray; font-size: 0.8em" >아이디 중복 확인이 완료되었습니다.</span> </fieldset> </form>'; |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | <?php $id = $_POST [ 'id' ]; ?> <div style= "height: 50px; width: 100%" > <p></p> </div> <form method= 'post' action= 'keep.php' onsubmit= "alert('입력한 정보가 확실한가요?')" > <legend><h3>Step 2</h3></legend> <fieldset> <p>아이디: <input type= "text" name= "id" value= "<?php echo $id;?>" disabled></p> <p>닉네임: <input style= "IME-MODE: disabled" maxlength= "12" type= "text" name= "nickname" ></p> <p>비밀번호: <input minlength= "6" maxlength= "20" type= "password" name= "pw" ></p> <span style= "color: gray; font-size: 0.8em" >비밀번호는 6자 이상, 20자 미만으로 작성해주세요.</span> <p>전자우편 주소: <input type= "email" name= "email" ></p> <span style= "color: gray; font-size: 0.8em" >이메일은 중요하게 사용되오니 실제 사용하는 이메일을 입력하여주세요.</span> <input type= "hidden" name= "UIP" value= "<?php echo $_SERVER['REMOTE_ADDR']?>" > <button type= "submit" >작성 완료!</button> </fieldset> </form> </div> |
뜬금없이 아이디가 going.php로 전해지지 않습니다... 아무리 보아도 문제를 찾지 못하여 올려봅니다.
keep.php에서는 아이디를 제외한 다른 모든 정보가 잘 받아집니다.
작성자
댓글 5


2019.01.20. 14:30

감사합니다

2019.01.20. 18:14


https://www.w3.org/TR/html401/interact/forms.html#disabled
공식 문서를 보시면 disabled로 설정된 폼에 전달되지 않는다고 나와있습니다.
해당 기능을 비슷하게 사용하고 싶으시다면 readonly 속성을 이용해보시기 바랍니다.

2019.01.20. 15:53

감사합니다

2019.01.20. 18:14
권한이 없습니다.
저도 스크립트만 봐서는 정확히 잘 모르겠지만...
input 태그에서 disabled 속성을 주면 form 데이터로 보지 않기 때문에 action 페이지에 POST 방식으로 데이터 전송이 안 되는 것 아닌가요?