Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn how to dynamically set the form action using jQuery.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

618 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