Re: Best Practice
| From: | Paul Roberts | Date: | Sat, 21 Sep 2002 19:13:22 +0000 |
| Subject: | Re: Best Practice | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-117115@lists.php.net to get a copy of this message | ||
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
mail@paul-roberts.com
++++++++++++++++++++++++
----- Original Message -----
From: "Ashley M. Kirchner" <ashley@pcraft.com>
To: "PHP-General List" <php-general@lists.php.net>
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:ashley@pcraft.com> .
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