안녕하세요
여분필드를 사용해서만든 폼을 글 수정할때 기존 작업된 내용이 사라지는 문제가 발생하는데
무슨 문제인지 잘 모르겠네요..
Copy
<li>
<label for="wr_2" class="write_home">홈페이지</label>
<input type="text" name="wr_2" id="wr_2" class="frm_input full_input" placeholder="홈페이지 주소 입력">
</li>
<li>
<label for="wr_3" class="write_visitor">방문예약</label>
<input type="text" name="wr_3" id="wr_3" class="frm_input full_input" placeholder="방문예약 페이지 주소">
</li>
<li>
<label for="wr_4" class="write_tel">대표전화</label>
<input type="tel" name="wr_4" id="wr_4" class="frm_input full_input" placeholder="대표전화">
</li>
제목이랑 파일 이미지는 잘 올라오는데 여분 필드로 만든 이 부분만 수정을 눌렀을때 리셋이 되는 문제가 생깁니다.. 고수님들 의견 부탁드립니다!
답변 2개 / 댓글 1개
채택된 답변
+20 포인트
2020-10-23 (금) 11:12:52
<input type="text" name="wr_2" id="wr_2" class="frm_input full_input" placeholder="홈페이지 주소 입력">
에 value 값이 수정할때 입력되어 있어야 합니다.'
보통 아래와 같이 사용합니다.
<input type="text" name="wr_2" id="wr_2" value='<?php echo $write['wr_2']?>' class="frm_input full_input" placeholder="홈페이지 주소 입력">
답변에 대한 댓글 1개
뒷고기잘구움
2020-10-23 (금) 11:13:56
감사합니다! 질문올리고 저도 계속 찾아보다가 알게되었는데 답변해주셔서 감사합니다!
굉장히 간단한 문제였네요.. value에 값을 주면 해결되는거였는데
https://sir.kr/qa/309572 여기 참고하시면 됩니다
답변을 작성하려면 로그인이 필요합니다.