Artikel, PHP

Membuat Print Out Menggunakan PHP

print_php

Ok, Sharing kali ini kita bahas masalah Print Sederhana / simple print menggunakan PHP. Untuk perintah print dibantu dengan perintah javascript.

1. index.php

<html>
<head><title>Test print</title></head>
<body>
<?php
/*-------------------------------------------------------------------------------
| https://phpbego.wordpress.com
|-------------------------------------------------------------------------------
*/
?>
<a href="print.php?print=laporan" target="_blank">Cetak Laporan</a>
</body>
</html>

2. print.php

<HTML>
<HEAD>
<TITLE>Print</TITLE>
</HEAD>
<BODY onload="javascript:window.print()">
<?php
/*-------------------------------------------------------------------------------
| http:??phpbego.wordpress.com
| Juli 2012
|-------------------------------------------------------------------------------
*/
if (isset($_REQUEST['print']))
{
include $_REQUEST['print'] . ".php";
}
?>
</BODY>
</HTML>

3. laporan.php

<?php
/*-------------------------------------------------------------------------------
| https://phpbego.wordpress.com
|-------------------------------------------------------------------------------
*/

echo "<h1>Test Laporan Print Out</h1>Konten yang akan diprint ada dihalaman ini";
?>

Klik Tombol berikut untuk Download File Lengkap :: Download Source

Berikut Artikel Terkait Print menggunakan PHP :

https://phpbego.wordpress.com/2014/06/07/membuat-laporan-pdf-menggunakan-mpdf/

https://phpbego.wordpress.com/2014/07/07/krs-sederhana-dengan-print-pdf-menggunakan-mpdf/

About Suendri

Owner dan Founder Go Software Media sebelumnya bernama PHPBeGO Foundation

Discussion

2 thoughts on “Membuat Print Out Menggunakan PHP

  1. nice posting Pak en…

    Posted by Faiz Eel | July 24, 2013, 3:47 am
  2. Reblogged this on Feel and Memorials.

    Posted by fifisyafrina | June 2, 2014, 8:03 am

Tinggalkan Komentar

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow Go Software Media Blog on WordPress.com

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 63 other followers

Archives

%d bloggers like this: