|
 |
|
ทำไมมันฟ้องว่าแก้ไขข้อมูลแล้วแต่ในฐานข้อมูลมันยังไม่แก้ค่ะ ด่วนๆค่ะ |
|
 |
|
|
 |
 |
|
ให้เดานะ คุณไม่ได้ส่ง DOC_ID มา
วิธีส่งก็ใช้ hidden field <input type="hidden" name="DOC_ID" value="<? echo $rows["DOC_ID"]?>">
|
 |
 |
 |
 |
Date :
2009-04-10 01:26:22 |
By :
plakrim |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
แล้ว DOC_ID มันส่งค่ามายังไงอ่ะครับ ผ่านฟอร์ม ด้วย Method Post หรือเปล่า ลองเอาตัวส่งค่ามาให้ดูด้วยก้อคงจะดี แล้วก้อ $sql echo ออกมาแล้ว เป็นไง เอามาให้ดูด้วยครับ ช่วย ๆ กัน รอบดึก ^^
|
 |
 |
 |
 |
Date :
2009-04-10 01:26:54 |
By :
noomna19 |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
คุณหนุ่มคุง คนกรุงหรือบ้านนอกเหมือนผมครับ
กลับบ้านไหม ถามไถ่ยามดึก
|
 |
 |
 |
 |
Date :
2009-04-10 01:37:10 |
By :
plakrim |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
สงกรานต์ปีนี้ คาดว่าจะไม่กลับ จะไปบ้านว่าที่ภรรยาในอนาคต อ่ะครับ แต่ติดปัญหาอยู่ที่ว่า ปกติขึ้นรถตู้ที่อนุสาวรีย์.. แล้วตอนนี้จะไปขึ้นรถที่ไหนเนี้ย T_T (ทำไมถึงทำกับฉันได้) อิอิ 
|
 |
 |
 |
 |
Date :
2009-04-10 01:41:03 |
By :
noomna19 |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
echo ออกมาแล้วเป็นแบบนี้ค่ะ
Quote:Update document set PERSON_ID='2', TYPE='ป่วย', TOTAL='1', COMMENT='', DATE='2009-04-10', START_DATE='2009-04-10', END_DATE='2009-04-10' where DOC_ID=''
แก้ไขข้อมูลเรียบร้อยแล้ว!
ส่วนอันนี้ คือหน้าที่ส่งค่ามาค่ะ
Quote:<?
$DOC_ID = reqvar("DOC_ID");
$query ="SELECT *,date_format(START_DATE,'%d/%m/%Y') as START_DATE,date_format(END_DATE,'%d/%m/%Y') as END_DATE FROM document where DOC_ID = $DOC_ID";
$result=mysql_query($query) or die("Query failed show");
$row=mysql_fetch_array($result);
if($row){
$DOC_ID=$row["DOC_ID"];
$PERSON_ID=$row["PERSON_ID"];
$TYPE=$row["TYPE"];
$TOTAL=$row["TOTAL"];
$COMMENT=$row["COMMENT"];
$START_DATE=$row["START_DATE"];
$END_DATE=$row["END_DATE"];
}
?>
<table width="785" border = "1" cellpadding="0" cellspacing="0">
<tr>
<td width="750" class="style12">รายละเอียดการขอลา</td>
<tr>
<td><font face="Courier New, Courier, monospace">รหัสบุคลากร </font>
<input type=text name="PERSON_ID"size="20" value="<?=$PERSON_ID;?>"o></td></tr>
<tr>
<?
if($TYPE=="ป่วย"){
$sel="checked";
}else{
$sel = "";
}
if($TYPE=="คลอดบุตร"){
$sel2="checked";
}else{
$sel2 = "";
}
if($TYPE=="กิจส่วนตัว"){
$sel3="checked";
}else{
$sel3 = "";
}
echo"<td><font face=\"Courier New, Courier, monospace\">ขอลา :<br>";
echo"
<input type=\"radio\" name=\"TYPE\"value=\"ป่วย\" ".$sel." onclick=\"check_disabled(true)\">ป่วย<br>
<input type=\"radio\" name=\"TYPE\"value=\"คลอดบุตร\" ".$sel2." onclick=\"check_disabled(true)\">คลอดบุตร<br>
<input type=\"radio\" name=\"TYPE\"value=\"กิจส่วนตัว\" ".$sel3." onclick=\"check_disabled(false)\">กิจส่วนตัว เนื่องจาก</font><input type=text name=\"COMMENT\" id=\"COMMENT\" value=".$COMMENT." ></textarea></tr></td>";
?>
<tr>
<td >
<p><font face="Courier New, Courier, monospace">ระยะเวลาที่ขอลา</font>
</td>
</tr>
<tr>
<td>
<font face="Courier New, Courier, monospace">ตั้งแต่วันที่ </font>
<input id="START_DATE" class="txtshadow searchid" name="START_DATE" type="text" size="10" value="<? if (!empty($START_DATE))
{ echo $START_DATE; }else{ $date=date('d/m/Y'); echo ""; }?>" onkeyup="return datekeyupformat(this, event);" >
<img src="image/calendar.gif" border="0" onClick="showCalendar('START_DATE','DD/MM/YYYY')"> DD/MM/YYYY
<font face="Courier New, Courier, monospace"> ถึงวันที่ </font>
<input id="END_DATE" class="txtshadow searchid"name="END_DATE" type="text" size="10" value="<? if (!empty($END_DATE)){ echo $END_DATE; }else{ $date=date('d/m/Y'); echo ""; }?>" onkeyup="return datekeyupformat(this, event);" >
<img src="image/calendar.gif" border="0" onClick="showCalendar('END_DATE','DD/MM/YYYY')"> DD/MM/YYYY
</font>
</td>
</tr>
<tr>
<td>
<font face="Courier New, Courier, monospace">รวมกำหนดวันทั้งหมด</font><input type="text" name="TOTAL" size="5" style="text-align:right;" value="<?=$TOTAL;?>">วัน</td></tr>
<tr><td><center><input type="hidden" name="DOC_ID" value="<? echo $rows["DOC_ID"]?>">
<input type="submit" name="update" value="แก้ไข"></center>
|
 |
 |
 |
 |
Date :
2009-04-10 01:44:31 |
By :
Pizz |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ผมซกหัวนอนอยู่นี่เลย เสาวรีย์ แต่ไม่มีผลกับผม ต้องไปทำงานอีกเหมือนเดิม เย็นๆ ก็กลับสู่บ้านนอกของโผมมม...
|
 |
 |
 |
 |
Date :
2009-04-10 01:45:09 |
By :
plakrim |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
<input type="hidden" name="DOC_ID" value="<?=$DOC_ID;?>">
|
 |
 |
 |
 |
Date :
2009-04-10 01:47:01 |
By :
plakrim |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ผมมองหาแท็ก <form action="" method="post> ไม่เหงอ่ะครับ...ไม่รู้มันจะเกี่ยวกันหรือเปล่า มันมีอยู่หรือเปล่าครับ 
|
 |
 |
 |
 |
Date :
2009-04-10 01:50:45 |
By :
noomna19 |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
   
ขอบคุณมากค่ะ
ได้แล้ว อิอิ ดีใจจัง เหลืออีกที่เดียวแล้ว
รบกวนด้วยนะค่าาาาา
เก่งจิงๆๆ
|
 |
 |
 |
 |
Date :
2009-04-10 01:51:57 |
By :
Pizz |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
มีอยู่ค่ะ
ถ้าเอามาหมดหน้าคงต้องนั่งรถไฟอ่านแน่ๆเลยค่ะ
อิอิ
ขอบคุณมากๆค่ะ
|
 |
 |
 |
 |
Date :
2009-04-10 01:53:09 |
By :
Pizz |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
อยู่ ๆ ก้อได้ซะงั้น อิอิ นอนดึกมาก ๆ ระวังพรุ่งนี้จะป่วยนะครับ.. ด้วยความเปงห่วง 
|
 |
 |
 |
 |
Date :
2009-04-10 01:53:32 |
By :
noomna19 |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ยินดีด้วยครับ 
|
 |
 |
 |
 |
Date :
2009-04-10 01:55:11 |
By :
plakrim |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
น่านคุณหนุ่มคุง เป็นห่วงผมบ้างซิครับ 
|
 |
 |
 |
 |
Date :
2009-04-10 01:55:49 |
By :
plakrim |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
สงสัยจะรีบนอนไม่ได้ค่ะ
เพราะยังไม่เส็ดเลยค่ะเหลือที่เดียว อยู่อีกกระทู้ ตามไปอุดหนุนด้วนะค่ะสุดท้ายแระ อิอิ 026241
ต้องส่งพรุ่งนี้
ว่าแต่พรุ่งนี้เค้าหยุดรึป่าวค่ะ ตกลงที่ท่านนายกประกาศไม่ทันฟัง
อิอิ
|
 |
 |
 |
 |
Date :
2009-04-10 01:57:28 |
By :
Pizz |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ราชการหยุดนะครับ ดังนั้น โทรไปถามอาจารย์เลยครับ
|
 |
 |
 |
 |
Date :
2009-04-10 02:00:12 |
By :
plakrim |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ป่านนี้คงแกคงนอนแล้วล่ะค่ะ
อิอิ
พอดีว่า..สมัครเป็นครูสอนคอมเด็กๆ..แล้ว ผอ.ก้อให้แบบฟอร์มขอลามาใบนึง แล้วแกก้อบอกว่าให้ไปเขียนโปรแกรมมาให้เวลา3วัน พรุ่งนี้กำหนดนัดส่งแระ
ก้อยังงงๆอยู่ว่าตกลงสมัครเป็นอารายกานแน่หว่า
อิอิ
ถือว่าท่านทดสอบแระกาน.....อิอิ
|
 |
 |
 |
 |
Date :
2009-04-10 02:04:29 |
By :
Pizz |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
โห้...สั่งงานแบบไม่รู้เรื่องเลยนะเนี๊ยะ...
เขียนโปรแกรมนะไม่ใช้ปลอกกล้วย....ฝากบอก ท่าน ผอ. ด้วยนะ...
|
 |
 |
 |
 |
Date :
2009-04-10 09:40:08 |
By :
paphun |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 04
|