Agan2 computer stuff yang terhormat, udah lama ane gk main disini
langsung to the point aja ya gan, ane mau tanya :
1. Sorry kalo ane buka disini, Agan2 tau script "('or''=')" yang buat bobol masuk username password kyk ngehack, Gimana cara protectnya ya gan? itu kn ane metodenya post, katanya harus pake metode get, itu ngerubahnya ribet ya gan? Script ane :
Spoiler for login:
<?php session_start();
include "koneksi.php";
$username=$_POST['username'];
$password=$_POST['password'];
$query=mysql_query("select * from admin where username='$username' and password='$password'");
$cek=mysql_num_rows($query);
if($cek){
$_SESSION['username']=$username;
if ($username==" " AND $password==" ") echo'The username or password are incorrect!';
minimal diakalinnya kyk apa ya gan? biar gk kebobol pake itu
2. Ane mau urutin data untuk data yg update jadi yg paling atas gan, itu scriptnya apa ya? kalo nomor, tanggal atau index kn bisa kalo per update datanya apa ya gan bahasa dewanya? hehe Script ane:
Spoiler for index:
<?php
include "koneksi.php";
if (isset($_POST["code"])) { $code=$_POST["code"]; } else { $code=""; }
if (isset($_POST["namakegiatan"])) { $namakegiatan=$_POST["namakegiatan"]; } else { $namakegiatan=""; }
if (isset($_POST["uraian"])) { $uraian=$_POST["uraian"]; } else { $uraian=""; }
if (isset($_POST["pic"])) { $pic=$_POST["pic"]; } else { $pic=""; }
if (isset($_POST["status"])) { $status=$_POST["status"]; } else { $status=""; }
$sql=mysql_query("select * from berkas where code like '%$code%' and namakegiatan like '%$namakegiatan%' and uraian like '%$uraian%' and pic like '%$pic%' and status like '%$status%' order by code");?>
<!DOCTYPE html>
<html >
<head>
<meta charset="UTF-8">
<title>Pusyantek BPPT</title>