Undefined index: option

<body>
<table width="800" border="1" cellspacing="0" cellpading="0" align="center">
    <tr>
    <td width ="30%" height="69" valign="top" bgcolor="#00CCFF">
        <a href = "index.php?option=inputsiswa">Input Data Siswa</a><br>
        <a href = "index.php?option=listsiswa">Daftar Siswa</a><br>
        <a href = "index.php?option=inputbuku">Input Data Buku</a><br>
        <a href = "index.php?option=listbuku">list buku</a><br>
        <a href = "index.php?option=inputpinjam">Input Data Peminjaman Buku</a><br>
        <a href = "index.php?option=listpinjam">Daftar Peminjaman</a><br>
    </td>
    <td valign="top" bgcolor="#33FFFF">&nbsp;&nbsp;&nbsp;&nbsp;
</td>
<?php
include "config.php";
    //menu data siswa
    if (isset($_GET [option] ) == "input siswa" )
        {include "siswa/inputsiswa.php";}
    elseif ($_GET[option] == "savesiswa")
        {include "siswa/savesiswa.php";}
    elseif ($_GET[option] == "saveupdatesiswa")
        {include "siswa/saveupdatesiswa.php";}
    elseif ($_GET[option] == "listsiswa")
        {include "siswa/listsiswa.php";}
    elseif ($_GET[act] == "edit")
        {include "siswa/editsiswa.php";}
    elseif ($_GET[act] == "del")
        {include "siswa/delsiswa.php";}
    //pilihan table buku
    elseif ($_GET[option] == "inputbuku")
        {include "buku/inputbuku.php";}
    elseif ($_GET[option] == "savebuku")
        {include "buku/savebuku.php";}
    elseif ($_GET[option] == "saveupdatebuku")
        {include "buku/saveupdatebuku.php";}
    elseif ($_GET[option] == "listbuku")
        {include "buku/listbuku";}
    elseif ($_GET[act] == "editbuku")
        {include "buku/editbuku.php";}
    elseif ($_GET[act] == "delbuku")
        {include "buku/delbuku.php";}
    //menu data peminjaman
    elseif ($_GET[option] == "inputpinjam")
        {include "pinjam/inputpinjam.php";}
    elseif ($_GET[option] == "savepinjam")
        {include "pinjam/savepinjam.php";}
    elseif ($_GET[option] == "saveupdatepinjam")
        {include "pinjam/saveupdatepinjam.php";}
    elseif ($_GET[option] == "listpinjam")
        {include "pinjam/listpinjam.php";}
    elseif ($_GET[act] == "editpinjam")
        {include "pinjam/editpinjam.php";}
    elseif ($_GET[option] == "delpinjam")
        {include "pinjam/delpinjam.php";}
?>
</tr>
</table>
</body>
avatar iksanalimutaqien
@iksanalimutaqien

1 Kontribusi 0 Poin

Diperbarui 3 tahun yang lalu

Tanggapan

Baca aturan main di forum ini ya, sertakan kode atau gambar jika perlu

1 Jawaban:

<div>coba spasi antara $_GET dan [option] dihilangkan<br><br></div><pre>if (isset($_GET [option] ) == "input siswa" )</pre>

avatar mikhasetiyawati
@mikhasetiyawati

19 Kontribusi 2 Poin

Dipost 3 tahun yang lalu

Login untuk ikut Jawaban