Solved

How to print a certain portion of a php page by using a button.

Posted on 2008-10-01
2
314 Views
Last Modified: 2013-12-13
I want to make a specific portion of a php page printable by providing a button. I have a table whose fields are filled by a database query. Plus on this page i have some header and footer. Now i just want a hard copy of that table by clicking a button. How can i do that efficiently?
0
Comment
Question by:sudanshu
2 Comments
 
LVL 3

Accepted Solution

by:
cameroncooke earned 125 total points
Comment Utility
You can't tell the web browser what to print, but you do have the following options:

1) Use a print stylesheet to style the page for print. You can put styles in the stylesheet to remove unwanted elements just leaving the bits you want to print using display: none, you could also move thing s around etc. See http://www.webcredible.co.uk/user-friendly-resources/css/print-stylesheet.shtml

2) Create a 'Printable Version' button which opens a new window with a version of the page ready for print.
0
 

Author Comment

by:sudanshu
Comment Utility
it helps me

0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now