비번 없이 글 쓰고 댓글 달고 싶습니다
본문
비회원이 이름과 이메일만 넣고
바로 글쓰기를 하고 싶습니다
또한 댓글도 이름만 쓰면
바로 쓸수 있도록 하고 싶어요
비번은 넣는 부분이 안 보이고
5555 라는걸로 기본 설정 하려면 어떻게 해야 되나요 ?
답변 5
<!--<tr>
<th scope="row"><label for="wr_password">비밀번호<strong class="sound_only">필수</strong></label></th>
<td><input type="password" name="wr_password" id="wr_password" <?php echo $password_required ?> class="frm_input <?php echo $password_required ?>" maxlength="20"></td>
</tr>-->
해당 부분 전체 지우시거나 주석 처리 후 여기에 한 줄 추가하시면 됩니다.
<input type="hidden" name="sst" value="<?php echo $sst ?>">
<input type="hidden" name="sod" value="<?php echo $sod ?>">
<input type="hidden" name="page" value="<?php echo $page ?>">
이렇게 한줄 추가..
<input type="hidden" name="wr_password" value="55555">
비번의 용도는 해당 글의 비회원이 글 수정/삭제 권한을 주기 위해서 입니다.
그래도 상관없나요?
그럼 수정, 삭제를 못하게 됩니다.
댓글은 5555로 고정하면 아무나 남이 쓴 댓글을 지울수 있습니다.
비밀번호 부분의 type="text" 를 type="hidden" 으로 바꾸시고 value에 5555 넣으면 되겠지요
하지만 별로 추천하고 싶은 방법은 아니군요
소스는 아래 같은데요
비번 넣는 줄을 안 보이게 하고
비번은 디폴트로 55555나 다른걸로 고정해서
비번 넣는 줄을 안 보이고 나머지만 기록 하면 글을 쓸수 있도록 하고 싶습니다
답변 좀 부탁 드려요
<?php if ($is_password) { ?>
<tr>
<th scope="row"><label for="wr_password">비밀번호<strong class="sound_only"> 필수</strong></label></th>
<td><input type="password" name="wr_password" id="wr_password" <?php echo $password_required ?> class="frm_input <?php echo $password_required ?>" maxlength="20"></td>
</tr>
<?php } ?>
비번 넣는 줄을 안 보이게 하고
비번은 디폴트로 55555나 다른걸로 고정해서
비번 넣는 줄을 안 보이고 나머지만 기록 하면 글을 쓸수 있도록 하고 싶습니다
답변 좀 부탁 드려요
<?php if ($is_password) { ?>
<tr>
<th scope="row"><label for="wr_password">비밀번호<strong class="sound_only"> 필수</strong></label></th>
<td><input type="password" name="wr_password" id="wr_password" <?php echo $password_required ?> class="frm_input <?php echo $password_required ?>" maxlength="20"></td>
</tr>
<?php } ?>
답변을 작성하시기 전에 로그인 해주세요.