[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2008-10-01
2
Medium Priority
?
324 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 500 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article discusses how to create an extensible mechanism for linked drop downs.
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses
Course of the Month18 days, 16 hours left to enroll

834 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