Skip to content

Instantly share code, notes, and snippets.

View amin007's full-sized avatar
🏠
Working from home

amin007 amin007

🏠
Working from home
View GitHub Profile
@amin007
amin007 / borang.php
Last active August 29, 2015 14:22
masalah data-ajax=false
<?php
echo '<pre>'; print_r($_POST) . '</pre>';
@amin007
amin007 / kawal_index
Last active August 29, 2015 14:23
ada masalah hendak include fail aplikasi.tanya/$nama.php dalam __construct, tapi dalam index() boleh
<?php
class Index extends Kawal
{
function __construct($nama)
{
parent::__construct();
Kebenaran::kawalMasuk();
<html>
<head>
<style type="text/css">
table table {
width: 600px !important;
}
table div + div { /* main content */
width: 65%;
float: left;
}
@amin007
amin007 / borang.php
Created September 1, 2015 11:49
memahami tatasusunan dalam $_POST
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<form method="POST">
<input name="form[subscribe][phone][1]" type="text">
<input name="form[subscribe][phone][0]" type="text">
<?php
$sql = '(SELECT thn,F2201 as F22,F2301 as F23,F2401 as F24,concat_ws("-",F2501,F2542) as `F25`,concat_ws("-",F2601,F2642) as `F26`,concat_ws("-",F2701,F2742) as `F27`,F2801 as `%export F28`,F2901 as `kodUnit`,concat_ws("-",F3001,SUBSTRING(F3001,-10)) as `kodProduk`,( SELECT concat_ws("-",keterangan,kod_produk) FROM kod2010_output b WHERE b.kod_produk=SUBSTRING(F3001,-10) LIMIT 1) as nama_produk FROM `q14_2010` WHERE estab like '000000338955%' AND thn BETWEEN 2010 and 2012)
UNION
(SELECT thn,F2202 as F22,F2302 as F23,F2402 as F24,concat_ws("-",F2502,F2542) as `F25`,concat_ws("-",F2602,F2642) as `F26`,concat_ws("-",F2702,F2742) as `F27`,F2802 as `%export F28`,F2902 as `kodUnit`,concat_ws("-",F3002,SUBSTRING(F3002,-10)) as `kodProduk`,( SELECT concat_ws("-",keterangan,kod_produk) FROM kod2010_output b WHERE b.kod_produk=SUBSTRING(F3002,-10) LIMIT 1) as nama_produk FROM `q14_2010` WHERE estab like '000000338955%' AND thn BETWEEN 2010 and 2012)
UNION
(SELECT thn,F2203 as F22,F2303 as F23,F2403 as F24,concat
@amin007
amin007 / kira_furmula_input.php
Created September 25, 2015 06:42
Mengira formula dalam satu input dalam form.
<?php
/*
$_POST=Array
(
[sse15_kawal] => Array
(
[hasil] => 3364916+26400
[belanja] => 3364916+26400-211240
[gaji] => 1787720
[aset] => 1050943
@amin007
amin007 / buat_password_guna_md5.php
Created December 8, 2015 08:47
buat passsword guna md5
<?php
class Hash
{
/**
*
* @param string $algo The algorithm (md5, sha1, whirlpool, etc)
* @param string $data The data to encode
* @param string $salt The salt (This should be the same throughout the system probably)
* @return string The hashed/salted data
*/
@amin007
amin007 / searchdate.php
Created January 20, 2016 03:33
papar sql berasaskan bulan dan tahun
<form method="GET" action="searchdate.php">
search by Year <select id="year" name="year">
<option value="">All</option>
<?php
for($i=2015;$i < date("Y")+1; $i++)
{
echo '<option value="'.$i.'">'.$i.'</option>';
}
?>
</select><input type="submit" value="submit" name="submit">
@amin007
amin007 / upload.php
Last active May 11, 2016 17:08
upload-csv-file-with-file-name-into-mysql-using-php
<?php
function tambahSqlBanyakNilai($myTable, $medan, $senaraiData)
{
//echo '<pre>$data->', print_r($data, 1) . '</pre>';
# set sql
$sql = "INSERT INTO $myTable\r($medan) VALUES \r";
$sql .= implode(",\r", $data) . ";";
link - http://www.howtogeek.com/114884/how-to-repair-grub2-when-ubuntu-wont-boot/
Boot successfully repaired.
Please write on a paper the following URL:
http://paste2.org/XkD6NBIZ
In case you still experience boot problem, indicate this URL to:
[email protected] or to your favorite support forum.