날자계산 다시 질문드립니다. 적용 방법을 모르겠습니다 .ㅠ.ㅠ;
날자계산 질문입니다.. ㅡㅡ;;
이거 별짓다해봐도 계속 오류만 나네요.
------------------------------------------------- 소스 ----------
<tr>
<td>생년월일</td>
<td><input type=text name="by_birthday" value="<?=$by_birthday?>"> </td>
<td colspan=3>
키<input type=text name="by_height" value="<?=$by_height?>">
몸무게 <input type=text name="by_weight" value="<?=$by_weight?>">
</td>
</tr>
<input type=hidden name="ba_50" value="<?=$ba_50?>">
<input type=hidden name="ba_100" value="<?=$ba_100?>">
<input type=hidden name="ba_365" value="<?=$ba_365?>">
------------------------------------------------------------------------
소스의 일부분인데요..
위에 by_birthday 부분의 변수에 입력받은 값에 ;
날자계산 소스
// 기준일
$temp_day = '2008-07-01';
$plus_day = date("Y-m-d", strtotime("+50 day", strtotime($temp_day)));
echo $plus_day; // 7.1 + 50일 날짜 출력
를 적용하여 50일..100일...356일을 더해서.. 각 히든 변수에 넣어 저장하려고 합니다.
어찌해야 하는지..
<input type=hidden name="ba_50" value="<?
$ba_50 = date("Y-m-d", strtotime("+50 day", strtotime($by_birthday)))
>">
이렇게 해야 하나요 ? ㅡㅡ;;
도움주시면 정말 감사하겠습니다.
이거 별짓다해봐도 계속 오류만 나네요.
------------------------------------------------- 소스 ----------
<tr>
<td>생년월일</td>
<td><input type=text name="by_birthday" value="<?=$by_birthday?>"> </td>
<td colspan=3>
키<input type=text name="by_height" value="<?=$by_height?>">
몸무게 <input type=text name="by_weight" value="<?=$by_weight?>">
</td>
</tr>
<input type=hidden name="ba_50" value="<?=$ba_50?>">
<input type=hidden name="ba_100" value="<?=$ba_100?>">
<input type=hidden name="ba_365" value="<?=$ba_365?>">
------------------------------------------------------------------------
소스의 일부분인데요..
위에 by_birthday 부분의 변수에 입력받은 값에 ;
날자계산 소스
// 기준일
$temp_day = '2008-07-01';
$plus_day = date("Y-m-d", strtotime("+50 day", strtotime($temp_day)));
echo $plus_day; // 7.1 + 50일 날짜 출력
를 적용하여 50일..100일...356일을 더해서.. 각 히든 변수에 넣어 저장하려고 합니다.
어찌해야 하는지..
<input type=hidden name="ba_50" value="<?
$ba_50 = date("Y-m-d", strtotime("+50 day", strtotime($by_birthday)))
>">
이렇게 해야 하나요 ? ㅡㅡ;;
도움주시면 정말 감사하겠습니다.
댓글 1개
sjsjin
17년 전
<input type=hidden name="ba_50" value="<?=date("Y-m-d", strtotime("+50 day", strtotime($by_birthday)));?>">
<input type=hidden name="ba_100" value="<?=date("Y-m-d", strtotime("+100 day", strtotime($by_birthday)));?>">
단, $by_birthday 라는 변수는 이전 페이지에서 넘어오는 값이라야 합니다.(post/get 상관없고)
<input type=hidden name="ba_100" value="<?=date("Y-m-d", strtotime("+100 day", strtotime($by_birthday)));?>">
단, $by_birthday 라는 변수는 이전 페이지에서 넘어오는 값이라야 합니다.(post/get 상관없고)
게시판 목록
토크
개발과 관련된 어떤 얘기도 괜찮습니다.
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 241 | 15년 전 | 1026 | ||
| 240 | 15년 전 | 1519 | ||
| 239 |
|
15년 전 | 1069 | |
| 238 | 15년 전 | 1444 | ||
| 237 |
|
15년 전 | 1090 | |
| 236 | 15년 전 | 1391 | ||
| 235 | 15년 전 | 1254 | ||
| 234 | 15년 전 | 962 | ||
| 233 |
|
15년 전 | 1075 | |
| 232 | 15년 전 | 1440 | ||
| 231 | 15년 전 | 1157 | ||
| 230 | 15년 전 | 1396 | ||
| 229 |
확실한방법
|
15년 전 | 1521 | |
| 228 | 15년 전 | 1578 | ||
| 227 | 15년 전 | 1234 | ||
| 226 | 15년 전 | 1624 | ||
| 225 | 15년 전 | 1317 | ||
| 224 |
|
15년 전 | 1005 | |
| 223 |
|
15년 전 | 1221 | |
| 222 | 15년 전 | 1619 | ||
| 221 | 15년 전 | 1154 | ||
| 220 | 15년 전 | 1420 | ||
| 219 |
dannykim
|
15년 전 | 1142 | |
| 218 | 15년 전 | 1961 | ||
| 217 |
기획매니아
|
15년 전 | 1443 | |
| 216 | 15년 전 | 2660 | ||
| 215 | 15년 전 | 2093 | ||
| 214 | 15년 전 | 1340 | ||
| 213 |
|
15년 전 | 1150 | |
| 212 | 15년 전 | 1157 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기