 |
ถ้าเรา รับค่า $_GET มาปี 2018 แล้วให้ + เพิ่มอีก 2 ปี แล้วเอาค่ามา Query |
|
 |
|
|
 |
 |
|
Code (PHP)
//เอาไว้บนสุดของ page ดูครับ หรือไม่ก็หาโค้ดเช็คที่มัน ว่าค่าที่ใช่คืออัลไล
error_reporting(~E_NOTICE);
|
 |
 |
 |
 |
Date :
2018-04-20 10:31:23 |
By :
nobetaking |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ขอบคุณคะ
ใช้ error_reporting(~E_NOTICE); มันก็ได้แหละ
ส่วนใหญ่เราใช้วิธีนี้ดักกันเหรอค่ะ หรือว่าเชคจากค่า if...else เอาคะ
|
ประวัติการแก้ไข 2018-04-20 11:04:32
 |
 |
 |
 |
Date :
2018-04-20 10:34:37 |
By :
nottpoo |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
อันนี้ผมไปขุดเจอมาครับ
ลองดูนะครับ
อิอิ
Code (PHP)
<?php
$stuid = !empty($stuid) ? $stuid : NULL;
if(!empty($stuid)){
$query_student="select * from tb_student where stu_id='$stuid'";
$student=mysql_query($query_student,$connect) or die (mysql_error());
$row_student=mysql_fetch_assoc($student);
} else {
echo 'ไม่สามารถดึงข้อมูลได้';
}
?>
|
 |
 |
 |
 |
Date :
2018-04-20 10:40:58 |
By :
nobetaking |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ขอบคุณคะ
|
 |
 |
 |
 |
Date :
2018-04-20 11:05:21 |
By :
nottpoo |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|