날자계산 질문입니다.. ㅡㅡ;;
이거 별짓다해봐도 계속 오류만 나네요.
------------------------------------------------- 소스 ----------
<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개
<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 상관없고)
게시글 목록
| 번호 | 제목 |
|---|---|
| 209 |
개발자
질문은 아니지만..
1
|
| 202 | |
| 193 | |
| 192 | |
| 185 | |
| 177 | |
| 174 | |
| 171 | |
| 167 | |
| 162 |
개발자
latest() sql
4
|
| 160 | |
| 157 | |
| 150 |
디자이너
포토샵 색상문제 좀 봐주세요.
6
|
| 147 | |
| 145 |
개발자
헉........
1
|
| 142 |
개발자
플래쉬파일로
3
|
| 138 | |
| 133 | |
| 130 | |
| 127 |
개발자
php질문좀 하겠습니다.
2
|
| 117 | |
| 115 | |
| 111 |
디자이너
샘플같이 글씨 쓰는 방법...?
3
|
| 105 |
디자이너
글꼴 이름 좀 부탁드립니다.
5
|
| 102 | |
| 98 |
개발자
php 질문(초초보)
3
|
| 90 |
개발자
어떻게 하면...
7
|
| 77 | |
| 73 |
디자이너
그라이언트 주는 방법?
3
|
| 70 |
디자이너
투명도 주는 방법?
2
|
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기