Re: pass the page id to the css.php

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • jsd219

    #1

    Re: pass the page id to the css.php

    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.
  • sheldonlg

    #2
    Re: pass the page id to the css.php

    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.

    Comment

    • I V

      #3
      Re: pass the page id to the css.php

      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>

      Comment

      • Michael Fesser

        #4
        Re: pass the page id to the css.php

        ..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

        Comment

        Working...