Skip to content

Instantly share code, notes, and snippets.

View irfanbakhtiar's full-sized avatar

Muhammad Irfan Bakhtiar irfanbakhtiar

View GitHub Profile
@irfanbakhtiar
irfanbakhtiar / index.php
Last active September 27, 2019 04:44
Test Blog
<?php
echo "TEST";
?>
@irfanbakhtiar
irfanbakhtiar / db.sql
Created September 25, 2019 15:53
Database CRUD
-- phpMyAdmin SQL Dump
-- version 4.4.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Sep 25, 2019 at 05:33 PM
-- Server version: 5.6.26
-- PHP Version: 5.6.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
@irfanbakhtiar
irfanbakhtiar / update.php
Created September 25, 2019 15:52
File aksi edit
<?php
require_once 'contents/header.php';
include '/contents/koneksi.php';
$id = $_POST['id'];
$nama = $_POST['nama'];
$username = $_POST['username'];
$password = $_POST['password'];
$email = $_POST['email'];
if(empty($nama) || empty($username) || empty($password) || empty($email))
{
@irfanbakhtiar
irfanbakhtiar / tambah_aksi.php
Created September 25, 2019 15:48
File aksi tambah data
<?php
require_once 'contents/header.php';
include '/contents/koneksi.php';
$nama = $_POST['nama'];
$username = $_POST['username'];
$password = $_POST['password'];
$email = $_POST['email'];
if(empty($nama) || empty($username) || empty($password) || empty($email))
{
echo "<div class='container'><center><h1><b>CRUD SIMPLE</b></h1></center><hr></div><br/><br/><br/><br/>";
@irfanbakhtiar
irfanbakhtiar / hapus.php
Created September 25, 2019 15:46
File Hapus
<?php
include '/contents/koneksi.php';
$id = $_GET['id'];
mysqli_query($koneksi,"delete from tugas1 where id='$id'");
header("location:index.php");
?>
@irfanbakhtiar
irfanbakhtiar / edit.php
Created September 25, 2019 15:45
File edit data
<!DOCTYPE html>
<html>
<head>
<?php require_once 'contents/header.php'; ?>
</head>
<body>
<div class="container">
<center><h1><b>CRUD SIMPLE</b></h1></center>
<br/><br/><br/><br/>
<h3><b>EDIT DATA</b></h3>
@irfanbakhtiar
irfanbakhtiar / tambah.php
Created September 25, 2019 15:44
File Tambah Data
<!DOCTYPE html>
<html>
<head>
<?php require_once 'contents/header.php'; ?>
</head>
<body>
<div class="container">
<center><h1><b>CRUD SIMPLE</b></h1></center>
<br/><br/><br/><br/>
@irfanbakhtiar
irfanbakhtiar / index.php
Created September 25, 2019 15:43
File Index
<!DOCTYPE html>
<html>
<head>
<?php require_once 'contents/header.php'; ?>
</head>
<body>
<div class="container">
<center><h1><b>CRUD </b>SIMPLE</h1></center>
<hr>
<br/><br/><br/><br/>
@irfanbakhtiar
irfanbakhtiar / footer.php
Created September 25, 2019 15:42
File footer
@irfanbakhtiar
irfanbakhtiar / header.php
Created September 25, 2019 15:40
File header
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>CRUD Simple | TUGAS1</title>
<link rel="stylesheet" href="css/bootstrap.min.css">
</head>