|
|
|
ถามเรื่องการเรียกข้อมูลขึ้นมาแก้ไข จากฟังก์ชันนะคะไม่ทราบว่าเมื่อกดปุ่มแก้ไขแล้วจะเรียกวันเดือนปีที่เก็บในฐานข้อมูล |
|
|
|
|
|
|
|
function DateSelector($inName, $useDate=0)
{
/* create array so we can name months */
$monthName = array(1=> "January", "February", "March",
"April", "May", "June", "July", "August",
"September", "October", "November", "December");
/* if date invalid or not supplied, use current time */
if($useDate == 0)
{
$useDate = Time();
}
/* make month selector */
echo "<SELECT NAME='Month'>\n";
for($currentMonth = 1; $currentMonth <= 12; $currentMonth++)
{
echo "<OPTION VALUE=\"$currentMonth\"";
echo intval($currentMonth);
echo "\"";
if(intval(date( "m", $useDate))==$currentMonth)
{
echo " SELECTED";
}
echo ">" . $monthName[$currentMonth] . "\n";
}
echo "</SELECT> -
";
/* make day selector */
echo "<SELECT NAME='Day'>\n";
for($currentDay=1; $currentDay <= 31; $currentDay++)
{
echo "<OPTION VALUE=\"$currentDay\"";
if(intval(date( "d", $useDate))==$currentDay)
{
echo " SELECTED";
}
echo ">$currentDay\n";
}
echo "</SELECT> - ";
/* make year selector */
echo "<SELECT NAME='Year'>\n";
$startYear = date( "Y", $useDate);
for($currentYear = $startYear - 5; $currentYear <= $startYear+5;$currentYear++)
{
echo "<OPTION VALUE=\"$currentYear\"";
if(date( "Y", $useDate)==$currentYear)
{
echo " SELECTED";
}
echo ">$currentYear\n";
}
echo "</SELECT>";
}
*************************************
จากฟังก์ชันนะคะไม่ทราบว่าเมื่อกดปุ่มแก้ไขแล้วจะเรียกวันเดือนปีที่เก็บในฐานข้อมูล(ซึ่งเก็บไว้ในฟิลล์เดียวกันนะค่ะ)
แสดงขึ้นมาอย่างไรค่ะให้มันแสดงค่าที่เราเก็บไว้อ่ะค่ะ
ช่วยหน่อยนะค่ะ
Tag : - - - -
|
|
|
|
|
|
Date :
25 ธ.ค. 2550 10:26:33 |
By :
mai |
View :
1310 |
Reply :
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
อยากได้โค๊ดของ VB.NETค่ะ
ขอบคูณค่ะ ส่งเข้าเมวก็ได้นะ
|
|
|
|
|
Date :
2009-04-29 11:21:52 |
By :
DAW |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 05
|