테스트 사이트 - 개발 중인 베타 버전입니다

기본 베이직 글쓰기 화면에서 전화번호 입력 항목을 추가할려고 합니다. 채택완료

아미꼬 10년 전 조회 4,072

기본 베이직 글쓰기입니다. 여기서 홈페이지 부분 바로 위에 전화 번호 입력 칸을 하나 더 넣으려고

하는데요.

 

    <div class="tbl_frm01 tbl_wrap">
        <table>
        <tbody>
        <?php if ($is_name) { ?>
        <tr>
            <th scope="row"><label for="wr_name">이름<strong class="sound_only">필수</strong></label></th>
            <td><input type="text" name="wr_name" value="<?php echo $name ?>" id="wr_name" required class="frm_input required" size="10" maxlength="20"></td>
        </tr>
        <?php } ?>

        <?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 } ?>

        <?php if ($is_email) { ?>
        <tr>
            <th scope="row"><label for="wr_email">이메일</label></th>
            <td><input type="text" name="wr_email" value="<?php echo $email ?>" id="wr_email" class="frm_input email" size="50" maxlength="100"></td>
        </tr>
        <?php } ?>

 

---------추가할 부분-------------------

        <?php if ($is_wr_1) { ?>
        <tr>
            <th scope="row"><label for="wr_1">홈페이지</label></th>
            <td><input type="text" name="wr_1" value="<?php echo $wr_1 ?>" id="wr_1" class="frm_input" size="50"></td>
        </tr>
        <?php } ?>

-------------------------------------

저렇게 바꿧더니 홈페이지에서 추가할 부분이 나오지 않고 있습니다.

바로밑에 있는 is_homepage 텍스트 복사하여 wr_1로 수정하였습니다.

제가 개념도 모르고 수정하다보니 추가한 내용의 입력칸이 나오고 있지 않습니다.

 

        <?php if ($is_homepage) { ?>
        <tr>
            <th scope="row"><label for="wr_homepage">홈페이지</label></th>
            <td><input type="text" name="wr_homepage" value="<?php echo $homepage ?>" id="wr_homepage" class="frm_input" size="50"></td>
        </tr>
        <?php } ?>

 

도움좀 부탁 드립니다. 꾸벅....ㅜ.ㅜ."
 

댓글을 작성하려면 로그인이 필요합니다.

답변 3개

채택된 답변
+20 포인트
삭제 하셔야 됩니다
로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

<tr>

<th scope="row"><label for="wr_1">전화번호</label></th>

<td>

<input type="text" size="4" class="frm_input" name="tel1">

<input type="text" size="4" class="frm_input" name="tel2">

<input type="text" size="4" class="frm_input" name="tel3">

</td>

</tr>

 

update.skin.php 쪽에서

$wr_1 = "$tel1-$tel2-$tel3";

sql_query("update ~~~ ");

로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

<br />
        &lt;tr&gt;<br />
            &lt;th scope=&quot;row&quot;&gt;&lt;label for=&quot;wr_1&quot;&gt;홈페이지&lt;/label&gt;&lt;/th&gt;<br />
            &lt;td&gt;&lt;input type=&quot;text&quot; name=&quot;wr_1&quot; value=&quot;&lt;?php echo $wr_1 ?&gt;&quot; id=&quot;wr_1&quot; class=&quot;frm_input&quot; size=&quot;50&quot;&gt;&lt;/td&gt;<br />
        &lt;/tr&gt;<br />
        <br />
<br />
로그인 후 평가할 수 있습니다

답변에 대한 댓글 2개

아미꼬
10년 전
작성해주신 답변 바로 상단 부분에 <?php if ($is_wr_1) { ?> 이 부분은 어떻게 처리 하나요?
저렇게 작성하니 여전히 전화번호 항목을 안나옵니다.


이렇게 작성하니 제대로 출력이 됩니다.
하지만 궁금한 것이

<?php if ($is_homepage) { ?>
<tr>
<th scope="row"><label for="wr_1">홈페이지</label></th>
<td><input type="text" name="wr_1" value="<?php echo $wr_1 ?>" id="wr_1" class="frm_input" size="50"></td>
</tr>
<?php } ?>


<?php if ($is_homepage) { ?> 이렇게 되있는 부분을 안바꾸고
그냥 놔둬도 되는것입니까?

아니면 그냥 저부분의 열린태그와 닫힌태그..삭제해야 되는 것입니까?
작은별
10년 전
여분 필드 사용시엔 말씀하신 부분 삭제하세요. 닫는 쪽 줄도 삭제하시고요.

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인