[제나플러스] 회원가입시 생년월일 셀렉트박스로 하기
본문
skin/member/사용스킨/register_form.skin.php
<?
$birth_info = explode("|",$member[mb_birth]);
$info01 = $birth_info[0];
$info02 = $birth_info[1];
$info03 = $birth_info[2];
?>
<? if ($w=="") { ?>
<TR bgcolor="#FFFFFF">
<TD class=m_title>생년월일</TD>
<TD class=m_padding>
<input type=hidden name=mb_birth required value='<?=$member[mb_birth]?>'>
<select name='info01'>
<?php
for ($i = 2008; $i >= 1900; $i+=-1) {
print("<option value='$i' ");
if ($i == $info01) {
print "selected";
}
print(">".$i."년\n");
}
?>
</select>
<select name='info02'>
<?php
for ($i = 1; $i <= 12; $i+=1) {
if( $i <= 9 )
print("<option value='0$i' ");
else
print("<option value='$i' ");
if ($i == $info02) {
print "selected";
}
print(">".$i."월\n");
}
?>
</select>
<select name='info03'>
<?php
for ($i = 1; $i <= 31; $i+=1) {
if( $i <= 9 )
print("<option value='0$i' ");
else
print("<option value='$i' ");
if ($i == $info03) {
print "selected";
}
print(">".$i."일\n");
}
?>
</select>
</TD>
</TR>
<? } else { ?>
<input type=hidden name=mb_birth value='<?=$member[mb_birth]?>'>
<? } ?>
bbs/register_form_update.php
$mb_birth = "$info01$info02$info03";
댓글목록 0
등록된 댓글이 없습니다.