อยากจะถามว่าเมื่อเข้ามาหน้าหรือเงื่อนไขที่มีคำสั่ง <script>alert('ขออภัย.....กรุณากลับไปตรวจสอบ ');history.back();</script> เมื่อเรากด OK แล้วมันจะกลับมาเดิมที่เราส่งค่าจากฟอร์มไป และข้อมูลใน textbox ก็จะยังคงอยู่เหมือนเดิมไม่ต้องมากรอกใส่ใหม่

กรณีของผม มันกลับต้องมากรอกข้อมูลใหม่หมดทุกครั้งเมื่อกลับมาหน้าเดิม มันเป็นเพราะอะไรหรือครับ

code ,มันประมาณนี้อะครับ ส่งข้อมูล-รับข้อมูลในหน้าเดียวกัน ครับ

if($_GET[op] == "new_member_add" AND $_GET[action] == "add"){  

     <form method="post" name="form" action="?name=operator&file=mge_member&op=new_member_add&action=add">


</form >

ก่อนไป URL คือ index.php?name=operator&file=mge_member&op=member_add

ตอนส่ง URL คือ  ndex.php?name=operator&file=mge_member&op=new_member_add&action=add

เมื่อกด OK ตอนกลับ URL ก็เหมือนตอนก่อนส่งค่าไป คือ ndex.php?name=operator&file=mge_member&op=member_add
 
มันเป็นที่ Action หรือ อะไรกันแน่ ครับที่ต้องมาใส่ข้อมูลใหม่ในช่องเท็กบล็อกทุกครั้ง
กรกฎ วิริยะ 24 พ.ย. 2552 08:48
ลองใช้ history.go(-1)  ดูครับ

ถ้าเรากลับหน้าเดิมโดยการใช้ URL ก็จะเป็นการเริ่มค่าใหม่เสมอครับ ถ้าต้องการคงค่าเดิมไว้ (แต่ไม่ทุกตัว) ต้องใช้ history เท่านั้นครับ

ปัญหาพวกนี้อาจแก้ไขได้ไม่สมบูรณ์นักครับ ในทุกรณี ผมจึงเลือกที่จะ submit ด้วย Ajax ครับ เพราะจะไม่ต้องกังวลเรื่องพวกนี้ ดูตัวอย่างเทคนิคเหล่านี้ได้บน GCMS ครับ
steamlose S.K 24 พ.ย. 2552 12:44

ขอบคุณครับอาจารย์

steamlose S.K 24 พ.ย. 2552 13:09
ลองแล้วครับ history.go(-1) ไม่ได้ครับ
แล้วผมลองโหลด  cms3 มาแล้ว ติดตั้งไม่ได้ครับ

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, steamlose@steamlose.co.th and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.


Apache/2.2.8 (Win32) PHP/5.2.6 Server at localhost Port 80
 
Penthai [PHP] Khum 24 พ.ย. 2552 17:59
ยังไม่เปิด mod_rewrite แน่ๆ เลย
กรกฎ วิริยะ 24 พ.ย. 2552 19:12
อ่านวิธีแก้ปัญหาบน gcms.goragod.com เลยครับ มีบอกไว้อยู่

อาการนี้น่าจะเป็นไม่สามารถใช้ .htaccess ได้ครับ
steamlose S.K 25 พ.ย. 2552 10:31
ครับอาจารย์