Postingan lainnya
Saya belum bisa mengkonvert ke excel dengan memakai dhtmlx
Tanggapan
source code kamu taro di tag code biar enak dibacanya..
4 Jawaban:
siang rekan sekolah koding, saya anggota ingin minta tolong saya sdah coba googling, saya lagi buat latihan buat program helpdesk, akan tetapi saya coba buat modul login ya dahulu, setelah login di akses pegawai akan muncul menu seperti ini
dan masalah saya adalah ketika login masukkan username dan password tidak respon,,
berikut tag kode ya <pre> // ini file index.php <!DOCTYPE html> <!--<html>--> <head> <title>Selamat datang sistem helpdesk</title> <title>CRUD tot PHP dan MySQLi - WWW.MALASNGODING.COM</title> <link rel="stylesheet" type="text/css" href="css/style.css"> </head> <body> <!--<p class="form-login">--> <form method="post"> <div class="container"> <div class="row"> <div class="col-md-offset-5 col-md-3"> <div class="form-login"> <!--<p class="form-login">--><h4>Login Aplikasi</h4> <input type="text" id="username" name="username" class="form-control input-sm chat-input" placeholder="username ya" /> </br> <input type="password" id="password" name="password" class="form-control input-sm chat-input" placeholder="password" /> </br> <!--bila tak cocok bisa hpus lagi --> <input type="hidden" name="username" value="<?php echo ($_SESSION['username']);?>" readonly> <!-- <input type="password" id="id_karyawan" name="id_karyawan" class="form-control input-sm chat-input" placeholder="id_karyawan" /> </br>--> <div class="wrapper"> <span class="group-btn"> <button type="submit" name="submit" class="btn btn-primary btn-sm">Login <i class="fa fa-sign-in"></i></button> </span> </div> </div>
&lt;/div&gt;
&lt;/div&gt;
</div>
</form> <?php error_reporting(E_ALL ^ E_NOTICE); session_start(); include"koneksi.php"; if (isset($_POST['submit'])) { $user=$_POST['username']; $pass=$_POST['password']; $log= mysqli_query($koneksidatabase,"SELECT * from karyawan where username='$user' and password='$pass'"); $dat = mysqli_fetch_array($log); $username = $dat['username']; $password = $dat['password']; $status = $dat['status']; if ($user == $username && $pass == $password) { $_SESSION['username']="$username"; $_SESSION['password']="$password"; $_SESSION['status']="$status"; ?> <script type="text/javascript">alert("Login berhasil !!");document.location.href="dasboard.php"</script> <?php } else { header("location: index.php"); } } ?> </pre>
setelah berhasil masuk alurnya adalah ke dasboard.php <pre> <?php session_start(); if (empty($_SESSION['username']) || empty($_SESSION['password'])){ ?> <link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <div class="page-wrap d-flex flex-row align-items-center"> <div class="container"> <div class="row justify-content-center"> <div class="col-md-12 text-center"> <span class="display-1 d-block">eko </span> <div class="mb-4 lead">Silahkan melakukan login kembali</div> <a href="index.php" class="btn btn-link">Login</a> </div> </div> </div> </div> <?php } else { ?> <!DOCTYPE html> <html lang="en"> <head> <title>Sistem Helpdesk MIS</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <?php include "header.php" ?>
</head> <body>
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="dasboard.php">Sistem MIS</a>
</div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav">
<li class="active"><a href="dasboard.php">Home</a></li>
<li><a href="?halaman=pasien">Data User</a></li>
<li><a href="?halaman=penyakit">Data Tiket</a></li>
<li><a href="?halaman=rujukan">Persetujuan GA</a></li>
<li><a href="?halaman=print_lap">Laporan periksa</a></li>
<li><a href="?halaman=laporan">laporan</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="#" style="color: white;"><span class="glyphicon glyphicon-user" style="color: white;"></span> Selamat datang <?php echo $_SESSION['username'] ?> </a></li>
<li><a href="logout.php"><span class="glyphicon glyphicon-log-out"></span> Logout</a></li>
</ul>
</div>
</div>
</nav>
<div class="jarak_tabel">
<?php include "get.php"; ?>
</div>
<footer class="container-fluid text-center"> <p>Copyright © Sistem Pengembangan MIS | Suryapranoto | Jakarta. 2019</p> </footer>
</body> </html> <?php } ?> </pre>
ini kendalanya ketiksa masuk login tdk ada respon