여분필드 사용방법 질문입니다 채택완료
<div class="form-group">
<label class="col-sm-2 col-xs-12 control-label" for="entry_point">참가</label>
<div class="col-sm-3 col-xs-6">
<div class="control-label input-group input-group-sm">
<span class="input-group-addon">CFG scale</span>
<textarea name="wr_4" id="wr_4" rows="3" class="form-control input-sm" maxlength="500""><?php echo $write['wr_4']; ?></textarea>
</div>
</div>
이런식의 여분필드는 작성, 불러오기가 잘 되는데
<div class="col-sm-3 col-xs-6">
<div class="control-label input-group input-group-sm">
<span class="input-group-addon">Sampler</span>
<select name="type" id="type" class="form-control input-sm"> <?php echo $write['wr_3']; ?>
<option value="1"<?php echo get_selected("1", $type);?>>euler a</option>
<option value="2"<?php echo get_selected("2", $type);?>>euler</option>
<option value="3"<?php echo get_selected("3", $type);?>>DPM++ 2S a</option>
<option value="4"<?php echo get_selected("4", $type);?>>DPM++ 2M</option>
<option value="5"<?php echo get_selected("5", $type);?>>DPM++ SDE</option>
<option value="6"<?php echo get_selected("6", $type);?>>DPM++ 2S a Karras</option>
<option value="7"<?php echo get_selected("7", $type);?>>DPM++ 2M Karras</option>
<option value="8"<?php echo get_selected("8", $type);?>>DPM++ SDE Karras</option>
<option value="9"<?php echo get_selected("8", $type);?>>DDIM</option>
</select>
</div>
</div>
</div>
이런식으로 셀렉같은 경우 작동이 되지 않네요...
wr_3을 적용시키려면 어떻게 하면 될까요 ㅠㅠ?
답변 1개
답변에 대한 댓글 2개
<option value="euler"<?php echo get_selected("2", $type);?>>euler</option>
<option value="DPM++ 2S a"<?php echo get_selected("3", $type);?>>DPM++ 2S a</option>
<option value="DPM++ 2M"<?php echo get_selected("4", $type);?>>DPM++ 2M</option>
<option value="DPM++ SDE"<?php echo get_selected("5", $type);?>>DPM++ SDE</option>
<option value="DPM++ 2S a Karras"<?php echo get_selected("6", $type);?>>DPM++ 2S a Karras</option>
<option value="DPM++ 2M Karras"<?php echo get_selected("7", $type);?>>DPM++ 2M Karras</option>
<option value="DPM++ SDE Karras"<?php echo get_selected("8", $type);?>>DPM++ SDE Karras</option>
<option value="DDIM"<?php echo get_selected("8", $type);?>>DDIM</option>
이렇게 하니 됐네요 감사합니다!
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인
<option value="2"<?php echo get_selected("2", $wr_3);?>>euler</option>
<option value="3"<?php echo get_selected("3", $wr_3);?>>DPM++ 2S a</option>
<option value="4"<?php echo get_selected("4", $wr_3);?>>DPM++ 2M</option>
<option value="5"<?php echo get_selected("5", $wr_3);?>>DPM++ SDE</option>
<option value="6"<?php echo get_selected("6", $wr_3);?>>DPM++ 2S a Karras</option>
<option value="7"<?php echo get_selected("7", $wr_3);?>>DPM++ 2M Karras</option>
<option value="8"<?php echo get_selected("8", $wr_3);?>>DPM++ SDE Karras</option>
<option value="9"<?php echo get_selected("8", $wr_3);?>>DDIM</option>
이런식으로 바꿔봤는데 출력이 되질 않네요... $ 때고 wr_3만 넣으면 오류가 나구요.,..