Hi,

We are in the midst of editing a web site that was built in PHP. Since there are numerous pages, we want to use CSS (Cascading Style Sheets).

But!! The code is written this way within PHP tags:

<?php

$wnd->AddRow("Accessing Tracking Management");
$wnd->AddPwdBox("userpwd", "<b>Password</b>", "30");
$wnd->EndForm("Login", "Clear");
?>

These are textboxes and Button I've included as reference. Also note that we have an include file as Header and I am attaching the CSS file within the <HEAD> tags.

Now, how do I write Style Sheets to this PHP code? Help appreciated!

Thanks in advance.

Kamran Paracha
www.pexsol.com

    Looks like a template system

    Since the CSS is Client side it should make no difference if PHP builds the page. If you are using any named tags you just need to add the name to the structure being sent or to the template file.

    otherwise any CSS standard tags defined in the head of the page should work, NOTE the CSS sheet should be attached to the TEMPLATE file not the PHP file.

      We did attach the CSS to the template. The only thing we are stuck in is how to call the Styles to the code.

      For example, we have 3 styles created in the CSS, one is BODY, one is TEXTBOX and one is BUTTONS.

      I know the system won't accept if I insert the tags in the code as follows:

      $wnd->AddRow(class="body", "Accessing Tracking Management");
      $wnd->AddPwdBox(class="TEXTBOX","userpwd", "<b>Password</b>", "30");
      $wnd->EndForm(class="BUTTONS","Login", "Clear");

      Just looking for the syntax to add the class tags to the code. I hope I was able to clear my requirement. I throughly appreciuate your reply and time!

      Thanks again,

      Kamran Paracha
      www.Pexsol.com

        please dont double post - it wastes peoples time.

        have a look at my relpy in the other thread and see if that helps at all.

          I'd be honest with you. All our past experience is on Windows platform, mainly utilizing ASP on MS SQL server, though we hold very little experience in PHP like creating basic applications that just show data from a database.

          The script we are modifying are from Trackbiz.com - and I have attached a page as reference. This is an INC file that are called in an index page where we have included the CSS. If possible, have a look at the attachment and you will know.

          Thanks in advance,
          Kamran

            Search the scripts where those functions are and copy them into new functions where you add an "extra" variable.

            You'll see there's some html code, add the extra's to it...

            Suppose addrow does :

            function addRow($text) {
            echo "<tr><td>".$text."</td></tr>";
            }

            then you could make of it :

            function addRow($text, $extra) {
            echo "<tr><td ".$extra.">".$text."</td></tr>";
            }

            this way you can add whatever you want

              Write a Reply...