PHP problem

by Reywob(at)aol.com

 Date:  Tue, 4 Apr 2000 13:52:35 EDT
 To:  hwg-languages(at)hwg.org
  todo: View Thread, Original
Hi,

I'm trying to write my first php script, to pass a variable from page to page 
and include it in that page, or if there is no variable print an alternative. 
 This is so that a friend and I can share a couple of pages of our websites 
with each other.  However I cannot get it to work.  The code is:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">


<head>
    <title>Untitled</title>
    <link rel="stylesheet" href="<?php
        if ($css == 0):
        echo ("http://members.aol.com/reywob/newstyle.css");
        else:
        echo ("$css");
        endif;
        ?>" type="text/css">
</head>


<A HREF="variable.php3?css=anything.css">Change the page colour (hopefully!)</
A>





and you can see it in action at: <A 
HREF="http://www.narrowgauge.f2s.com/variable.php3">http://www.narrowgauge.f2s
.com/variable.php3</A>

Can any of you php wizards tell me what I've done wrong???  Guess I'm not far 
enough through the book (Professional PHP Programming) yet!

Thanks,
Peter.

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA