날자계산 다시 질문드립니다. 적용 방법을 모르겠습니다 .ㅠ.ㅠ;
날자계산 질문입니다.. ㅡㅡ;;
이거 별짓다해봐도 계속 오류만 나네요.
------------------------------------------------- 소스 ----------
<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 상관없고)
게시판 목록
토크
개발과 관련된 어떤 얘기도 괜찮습니다.
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 330 | 15년 전 | 1545 | ||
| 329 | 15년 전 | 1127 | ||
| 328 | 15년 전 | 1229 | ||
| 327 | 15년 전 | 1750 | ||
| 326 | 15년 전 | 2306 | ||
| 325 |
|
15년 전 | 1396 | |
| 324 | 15년 전 | 1171 | ||
| 323 | 15년 전 | 1100 | ||
| 322 | 15년 전 | 1267 | ||
| 321 | 15년 전 | 1373 | ||
| 320 | 15년 전 | 1081 | ||
| 319 | 15년 전 | 1616 | ||
| 318 |
terrorboys
|
15년 전 | 1339 | |
| 317 | 15년 전 | 1671 | ||
| 316 | 15년 전 | 1172 | ||
| 315 | 15년 전 | 1946 | ||
| 314 | 15년 전 | 1515 | ||
| 313 | 15년 전 | 1168 | ||
| 312 | 15년 전 | 1172 | ||
| 311 | 15년 전 | 1282 | ||
| 310 | 15년 전 | 1544 | ||
| 309 | 15년 전 | 1107 | ||
| 308 | 15년 전 | 1112 | ||
| 307 | 15년 전 | 1032 | ||
| 306 | 15년 전 | 1745 | ||
| 305 | 15년 전 | 2345 | ||
| 304 | 15년 전 | 1317 | ||
| 303 | 15년 전 | 1866 | ||
| 302 | 15년 전 | 1644 | ||
| 301 | 15년 전 | 1555 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기