just use css to define separate styles for each media
e.g.
<style type="text/css" media="screen,projection">
<!--
// screen style
-->
</style>
<style type="text/css" media="print">
<!--
// print style
-->
</style>

then the print style will be applied when the user clicks print.

Paul Roberts
http://www.paul-roberts.com
[EMAIL PROTECTED]
++++++++++++++++++++++++

----- Original Message ----- 
From: "Ashley M. Kirchner" <[EMAIL PROTECTED]>
To: "PHP-General List" <[EMAIL PROTECTED]>
Sent: Saturday, September 21, 2002 7:51 PM
Subject: [PHP] Best Practice



    I'm working on converting several static (price) pages on our site into dynamic 
pages, with the data stored in an MySQL database and PHP to pull the data out, with 
CSS to build the page and present it.  At the same time, I would also like to have a 
'printer friendly' link on each page that visitors can click on and get the same page 
re-rendered for easy printing.  What's the best way to get the data converted from one 
form to another?  Should I be querying the database again to get the same data to 
reformat?  Should I store the data in sessions and reformat based on the CSS?  I would 
think having to query twice for the same thing would be a degradation in performance, 
right?  So what's the best practice?

--
H | "Life is the art of drawing without an eraser." - John Gardner
  +--------------------------------------------------------------------
  Ashley M. Kirchner <mailto:[EMAIL PROTECTED]>   .   303.442.6410 x130
  Director of Internet Operations / SysAdmin    .     800.441.3873 x130
  Photo Craft Laboratories, Inc.            .     3550 Arapahoe Ave, #6
  http://www.pcraft.com ..... .  .    .       Boulder, CO 80303, U.S.A.




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to