Solved

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

Posted on 2008-10-01
2
318 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 3

Accepted Solution

by:
cameroncooke earned 125 total points
ID: 22612244
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
ID: 22632816
it helps me

0

Featured Post

Backup Solution for AWS

Read about how CloudBerry Backup fully integrates your backups with Amazon S3 and Amazon Glacier to provide military-grade encryption and dramatically cut storage costs on any platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

733 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