Solusi Code Deprecated: mysql_connect()

Posted on

$connection = mysqli_connect('localhost', 'username', 'password', 'database');
// Old way
mysql_query('CREATE TEMPORARY TABLE `table`', $connection);
// New way
mysqli_query($connection, 'CREATE TEMPORARY TABLE `table`');

Turn off all deprecated warnings including them from mysql_*:

error_reporting(E_ALL ^ E_DEPRECATED);

sumber :

Reset the Firefox Printer Default

Posted on Updated on

1. Launch Firefox.

2. Type “about:config” in the address bar at the top of the browser screen, then press “Enter.”

3. Click the “I’ll be careful, I promise!” button to confirm that you want to access Firefox’s advanced settings.

4. Scroll through the alphabetically-ordered list of advanced setting preferences in the main screen.

5. Right-click the “print_printer” entry in the print section. Select “Reset” from the context menu. If more than one “print_printer” entry shows in the list, reset each entry in the same way.


sumber : Support Mozilla

Menghilangkan header hasil print dengan fungsi window.print()

Posted on

Untuk menghilangkan header dan footer berupa alamat link website kita coba tambahkan attribute berikut ini.

Firefox :

  • moznomarginboxes di tag <html>

Contoh :

<html moznomarginboxes mozdisallowselectionprint>

sumber :

phpmysql error – #1273 – #1273 – Unknown collation: ‘utf8mb4_general_ci’

Posted on

Pernah kamu mengalami problem ini saat mengakses http://localhost/phpmyadmin tiba-tiba muncul pesan error

 #1273 – Unknown collation: ‘utf8mb4_general_ci’

Solusinya : CTRL+SHIFT+DEL untuk menghapus cache browser kamu.


sumber :

PHP : Format Tanggal menggunakan fungsi date() , strtotime()

Posted on Updated on

Hasilnya menjadi ’24-02-1991′
$format = date('d-m-Y', strtotime($tanggal ));
echo $format;

Hasilnya menjadi ’24 Februari 1991′
$format1 = date('d F Y', strtotime($tanggal ));
echo $format1;