Click here to get back home

Re: pass the page id to the css.php

 HomeNewsGroups | Search | About
 comp.lang.php    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Re: pass the page id to the css.php jsd219 07-25-2008
Get Chitika Premium
Posted by jsd219 on July 25, 2008, 2:05 pm
Please log in for more thread options
Well, i already have the css in a seperate file. the file is called
style.php

my header.php calls this file using:

<style type="text/css" media="all">
<!--
@import url("css/style.php");
-->
</style>

i have tried everything but i can't seem to make the style.php file
get the page id so my code will work.

Posted by sheldonlg on July 25, 2008, 3:17 pm
Please log in for more thread options
jsd219 wrote:
> Well, i already have the css in a seperate file. the file is called
> style.php
>
> my header.php calls this file using:
>
> <style type="text/css" media="all">
> <!--
> @import url("css/style.php");
> -->
> </style>
>
> i have tried everything but i can't seem to make the style.php file
> get the page id so my code will work.


Uh, what is the flow? You have file1 calling the page you want. I
don't know when the php is run in the case of an "@import". If it is
done at the client level, then all you are doing is passing in a php
script that the client has no idea on how to handle. Why not do a view
source to answer that question?

In any case, if you change "@import" to "require", with the appropriate
tags in style.css or surround the require with the tags, then it should
work.

Posted by I V on July 26, 2008, 1:43 am
Please log in for more thread options
On Fri, 25 Jul 2008 11:05:26 -0700, jsd219 wrote:
> <style type="text/css" media="all">
> <!--
> @import url("css/style.php");
> -->
> </style>
>
> i have tried everything but i can't seem to make the style.php file get
> the page id so my code will work.

What happens with:

> <style type="text/css" media="all">
> <!--
> @import url("css/style.php?pgID=<?php echo $pgID ?>");
> -->
> </style>


Posted by Michael Fesser on July 27, 2008, 7:24 am
Please log in for more thread options
.oO(I V)

>On Fri, 25 Jul 2008 11:05:26 -0700, jsd219 wrote:
>> <style type="text/css" media="all">
>> <!--
>> @import url("css/style.php");
>> -->
>> </style>
>>
>> i have tried everything but i can't seem to make the style.php file get
>> the page id so my code will work.
>
>What happens with:
>
>> <style type="text/css" media="all">
>> <!--
>> @import url("css/style.php?pgID=<?php echo $pgID ?>");
>> -->
>> </style>

Better:

<style type="text/css" media="all">
@import url("css/style.php?pgID=<?php echo $pgID ?>");
</style>

Or use a 'link' element instead.

Micha

Similar ThreadsPosted
How to pass a var to another php page w/o using a form July 22, 2005, 6:00 pm
Pass parameter to new page March 18, 2006, 1:02 am
how to pass data to linked page ??? March 29, 2005, 4:01 am
How to combine and pass data in one page? July 20, 2005, 6:28 am
pass upload page variables September 10, 2005, 2:34 am
what's wrong with this code? i am getting a blank page when i pass my form data to it October 17, 2005, 8:33 am
How to pass a function to a function?, and how to pass the variables of the function? September 23, 2005, 6:14 am
i can't seem to pass values with php August 8, 2004, 11:38 am
How to Pass PHP variables to JS? November 8, 2004, 12:13 pm
How to pass a value in Javascript to a value in php February 17, 2005, 2:58 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap