Hi all i have created my own template system well i am attempting to any way i have the template information in the database in a seperate table called templates
anyway i have this code to bring the header part of the template depending on the which template is selected in this case its the default template which is this code
PHP Code:
<?php
include("dbconnect.php");
$kQuery="SELECT * FROM template Where selected='1'";
$rs=mysqli_query($con,$kQuery);
if(!$rs)
{
echo "Error:".mysqli_error($con);
}
else
{
$count=mysqli_num_rows($rs);
if($count>0)
{
$data=mysqli_fetch_assoc($rs);
extract($data);
$Header=stripslashes($Header);
}
else
{
echo " Error:The Header you are Looking for cannot be found";
}
}
echo ($Error)?$Error:"";
echo ($Header)?$Header:"";
?>
How can i get it to do the CSS So if i remove the CSS Style sheet from server everything will remain the same as if the style sheet is from the server in a file called Layout.CSS?
Is this Possible maybe get some php code in the css document?
Of course the stylesheet can be a php document. stylesheet.php for example or /css/index.php Don't forget to add the correct header for a stylesheet though (text/css).
However, browsers tend to cache stylesheets so dynamic content will tend to get lost or ignored. You'll need to provide each call to the stylesheet with a unique URL or put the styles in the HTML.
“The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
—Tim Berners-Lee, W3C Director and inventor of the World Wide Web
However, browsers tend to cache stylesheets so dynamic content will tend to get lost or ignored. You'll need to provide each call to the stylesheet with a unique URL or put the styles in the HTML.
You can disable caching by sending a no-cache header and an expire header which is set in the past:
PHP Code:
header('Cache-Control: no-cache, must-revalidate');
header('Expires: Thur, 01 Jan 1970 00:00:00 UTC');
Tried it with both FF and IE on Win XP, and colors changed on every page load.
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
You can disable caching by sending a no-cache header and an expire header which is set in the past.
You can only request that the page not be cached. The granting of your request will depend upon the browser and the user settings.
“The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
—Tim Berners-Lee, W3C Director and inventor of the World Wide Web
Tried it with both FF and IE on Win XP, and colors changed on every page load.
Did you first set the browsers to cache stylesheets to see if the header request overrides the user preference?
“The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
—Tim Berners-Lee, W3C Director and inventor of the World Wide Web
Did you first set the browsers to cache stylesheets to see if the header request overrides the user preference?
Presumably I'm using whatever the default settings are for that, since I don't even know where to change it for IE or FF.
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
Bookmarks