날자계산 질문입니다.. ㅡㅡ;;
이거 별짓다해봐도 계속 오류만 나네요.
------------------------------------------------- 소스 ----------
<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 상관없고)
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 30 |
아우겐나이스
|
21년 전 | 4100 | |
| 29 |
아우겐나이스
|
21년 전 | 4480 | |
| 28 |
아우겐나이스
|
21년 전 | 3504 | |
| 27 | 21년 전 | 5886 | ||
| 26 | 21년 전 | 3156 | ||
| 25 | 21년 전 | 6134 | ||
| 24 | 18년 전 | 3700 | ||
| 23 | 21년 전 | 3693 | ||
| 22 | 21년 전 | 4282 | ||
| 21 | 21년 전 | 3874 | ||
| 20 | 21년 전 | 4275 | ||
| 19 | 21년 전 | 6726 | ||
| 18 | 21년 전 | 4772 | ||
| 17 | 21년 전 | 7017 | ||
| 16 | 21년 전 | 4213 | ||
| 15 | 21년 전 | 2674 | ||
| 14 | 21년 전 | 5009 | ||
| 13 | 21년 전 | 3435 | ||
| 12 |
Recluse
|
21년 전 | 3912 | |
| 11 |
아우겐나이스
|
21년 전 | 3594 | |
| 10 |
Recluse
|
21년 전 | 3435 | |
| 9 | 21년 전 | 4052 | ||
| 8 | 21년 전 | 5223 | ||
| 7 | 21년 전 | 4800 | ||
| 6 | 21년 전 | 5740 | ||
| 5 | 21년 전 | 4154 | ||
| 4 | 21년 전 | 4892 | ||
| 3 | 21년 전 | 4784 | ||
| 2 | 21년 전 | 3290 | ||
| 1 | 22년 전 | 4374 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기