คือผมทำแบบสอบถามในหนึ่งข้อให้เลือกข้อใดข้อหนึ่ง พอทำจนครบก็นำค่าที่ได้มาคำนวน แต่ที่อยากทราบคือโค๊ด check ที่ให้ติ๊กทุกข้อหนะครับ รบกวนผู้รู้ด้วย
ขอบคุณล่วงหน้าครับ
อยากทราบโค๊ด php user ต้องติ๊ก radio button ทุกตัวจึงสามารถไปหน้าต่อไปได้
Moderators: mindphp, ผู้ดูแลกระดาน
- mindphp
- ผู้ดูแลระบบ MindPHP
- Posts: 27110
- Joined: 22/09/2008 6:18 pm
- Contact:
Re: อยากทราบโค๊ด php user ต้องติ๊ก radio button ทุกตัวจึงสามารถไปหน้าต่อไปได้
วน Loop จำนวนข้อแล้วเช็คเอาก็ไ้ด้ครับ
ติดตาม VDO: http://www.youtube.com/c/MindphpVideoman
ติดตาม FB: https://www.facebook.com/pages/MindphpC ... 9517401606
หมวดแชร์ความรู้: https://www.mindphp.com/forums/viewforum.php?f=29
รับอบรม และพัฒนาระบบ: https://www.mindphp.com/forums/viewtopic.php?f=6&t=2042
ติดตาม FB: https://www.facebook.com/pages/MindphpC ... 9517401606
หมวดแชร์ความรู้: https://www.mindphp.com/forums/viewforum.php?f=29
รับอบรม และพัฒนาระบบ: https://www.mindphp.com/forums/viewtopic.php?f=6&t=2042
- dexjanghan
- PHP Sr. Member
- Posts: 68
- Joined: 02/03/2011 5:36 pm
Re: อยากทราบโค๊ด php user ต้องติ๊ก radio button ทุกตัวจึงสามารถไปหน้าต่อไปได้
ใช้แบบนี้ก็ได้นะ
ประมาณีแล่ะคับ
Code: Select all
if(trim($_POST["rad_01"]) == "") //ถ้า Method post ส่งค่าพารามิเตอร์ rad_01 เป็นค่าว่าง
{
echo "< กรุณากลับไปคลิกเลือกข้อ 1 ด้วย<br>";
exit();
}
if(trim($_POST["rad_02"]) == "")
{
echo "< กรุณากลับไปคลิกเลือกข้อ 2 ด้วย<br>";
exit();
}
ประมาณีแล่ะคับ
มื่อใหม่หัดใช้ PHP แต่คล่อง Joomla ซะมากกว่า
แวะเวียนเว็บโหลๆhttp://www.dexjanghan.com
แวะเวียนเว็บโหลๆhttp://www.dexjanghan.com
-
- Similar Topics
- Replies
- Views
- Last post
-
-
ปิด textbox เพื่อให้ไม่สามารถแก้ไขข้อมูลได้ด้วย radio button
by benzas00123 » 29/01/2020 11:31 am » in HTML CSS - 0 Replies
- 895 Views
-
Last post by benzas00123
29/01/2020 11:31 am
-
-
-
ดึงข้อมูล มาเเสดงเป็น radio button จะทำได้ยังค่ะ
by thatsawan » 29/07/2014 10:00 pm » in Programming - PHP - 5 Replies
- 5374 Views
-
Last post by thatsawan
30/07/2014 2:53 pm
-
-
-
รบกวนครับ ต้องการเลือก Radio Button แล้ว Disable ปุ่มอื่น
by demonxiii » 11/07/2011 11:11 am » in JavaScript & Jquery Ajax - 1 Replies
- 5025 Views
-
Last post by touleg
02/08/2011 8:19 pm
-
-
- 1 Replies
- 296 Views
-
Last post by tsukasaz
30/07/2019 6:49 pm
-
- 1 Replies
- 543 Views
-
Last post by thatsawan
23/02/2015 10:12 am
Who is online
Users browsing this forum: Google Adsense [Bot] and 17 guests