 |
|
เอ้อ แต่ว่า เบราซ์เซอร์มันจะไม่ดักจับเวลาอยู่ตลอด มันจะจับเฉพาะตอนที่โหลดหน้าขึ้นมา แล้วจะได้ค่าของเวลา ณ ตอนโหลดหน้า เก็บไว้ในตัวแปร thistime
ถ้ายังไงเปลี่ยนเป็น
function dateEstime($secon,$minit,$hour,$day,$month,$year){
return mktime($hour,$minit,$secon,$month,$day,$year)
}
$thisdate_time=date('d,m,Y,a,i,h');
$sql="select date_time from assignment";
$result=mysql_query($sql);
$row=mysql_fetch_array($result);
$i=0;
do{
$thedate=$row[$i];
$thedate=explode(' ',$thedate);
$datetdate=explode('-',$thedate[0]);
$timetdate=explode(':',$thedate[1]);
$sthedate=dateEstime($timetdate[0],$timetdate[1],$timetdate[2],datetdate[2]-1,$datetdate[1],$datetdate[0]);
$sthisdate=dateEstime($thisdate_time);
//-- จะให้แสดงข้อความก่อนหน้าวันนัดหมาย 1 วัน
if($sthedate>=$thisdate){
echo"<table><tr><td>คุณมีตารางนัดหมายค่ะ : ข้อความ : /"$row[story]/"</td></tr>
echo"<tr><td>เวลา $row[date_time]</td></tr></table>";
}
$i++;
}while($row=mysql_fetch_array($result));
|
 |
 |
 |
 |
Date :
12 ธ.ค. 2550 11:33:48 |
By :
hobbits |
|
 |
 |
 |
 |
|
|
 |