[pmwiki-users] PHP help with the " if " control statement

Miller, Joshua web at cityofelmira.net
Thu Mar 23 08:38:22 CST 2006


Hello,
 
I'm using the GuestBook recipe, modified with some of my own changes as
shown below.  The code below does not work because of the passages in
red.  I'm fairly new to PHP and can't see the problem in this code.  My
purpose here is that sometimes the link field will be left blank so I
don't want to display the text in blue if the link field is blank.   Can
anyone point out what is wrong or give me some help with what I am
trying to do?


        $rcpage['text'] = $before.
           /*   "\n$$$$\$default".  pog? */
                "\n"
                ."(:if date "
                .StripCSlashes($_GET["srtdate"])
                .".."
                .StripCSlashes($_GET["enddate"])
                .":)"
                ."\n!"
                .StripCSlashes($_GET["header"])
                ."\n"
                .StripCSlashes($_GET['desc'])
                ."\\\\"
                ."\n"
                if($_GET["link"]!=""){
                    ."  [["
                    .($_GET["link"])
                    ."| »Click here for more]]"
                }
                ."\n"
                ."(:ifend:)"
                .$after;
        WritePage($pagename,$rcpage);

Thanks!

-Josh


-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/pmwiki-users/attachments/20060323/35542295/attachment.html 


More information about the pmwiki-users mailing list