未定义索引:页面
未定义索引:aksi
<?php
$page = $_GET['page'];
$aksi = $_GET['aksi'];
if($page == "") {
if($aksi == "") {
include "page/dashboard.php";
}
} elseif($page == "dashboard") {
if($aksi == "") {
include "page/dashboard.php";
}
}elseif($page == "masuk") {
if($aksi == "") {
include "page/kas_masuk/masuk.php";
}
if($aksi == "hapus") {
include "page/kas_masuk/hapus.php";
}
}
?>
答案 0 :(得分:-1)
使用isset()
功能,如下所示,
<强>更新强>
要获得$_GET[]
以下
$page = (isset($_GET['page'])?$_GET['page']:'');
$aksi = (isset($_GET['aksi'])?$_GET['aksi']:'');
现在,如果$_GET[]
的值为空,我们将获得值,否则为空而不返回任何错误或警告