Help has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. Read more...

Task #596914 » index.php

Arjun Yovita, 2016-10-12 09:02 AM

if (isset($_POST['submit'])){
include ("conn.php");
echo "query yang dimasukkan : ".$query="select * from admin where username='$username' and password=MD5('$password')";
echo "<br>";
if ($cek_login)
echo "<br>STATUS : Berhasil Login ";
?> <a href="home.php">Forward to Home Admin</a> <?php
echo "<br>STATUS : Password Anda salah!";

<title>LOGIN YUK </title>
<script language="javascript">
function cek(){
var user= document.getElementById('userid').value;
var pass= document.getElementById('passwd').value;
if(user.replace(/^\s+| \s+$/g, '')==''){
alert('Username Harus Diisi!');
return false;
if(pass.replace(/^\s+| \s+$/g, '')==''){
alert('Password Harus diisi!');
return false;
return true;
<form action="index.php" method="post">
<table width="400" height="101" border="0" align="center">
<tr valign="bottom">
<td width="200" height="35" bgcolor="#CCCC33"><font size="4" face="verdana">Username</font></td>
<td width="137"><input type="text" name="username" size="20" id="userid"></td>
<tr valign="top">
<td height="34" bgcolor="#99FF00"><font size="4" face="verdana">Password</font></td>
<td><input type="password" name="password" size="20" id="passwd"></td>
<td><input name="submit" type="submit" onClick="return cek()"