<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7638.1">
<TITLE>RE: [pmwiki-users] PHP help with the " if " control statement</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<BR>
<BR>
<P><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">-----Original Message-----</FONT></SPAN>
<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">From: Neil Herber [</FONT></SPAN><A HREF="mailto:nospam@eton.ca"><SPAN LANG="en-us"><U><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">mailto:nospam@eton.ca</FONT></U></SPAN></A><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">] </FONT></SPAN>
<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">Sent: Thursday, March 23, 2006 10:59 AM</FONT></SPAN>
<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">To: Miller, Joshua; pmwiki-users@pmichaud.com</FONT></SPAN>
<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">Subject: Re: [pmwiki-users] PHP help with the " if " control statement</FONT></SPAN>
</P>
<P><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">At 2006-03-23 10:41 AM -0500, Miller, Joshua is rumored to have said:</FONT></SPAN>
<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">>Try</FONT></SPAN>
<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">></FONT></SPAN>
<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">> if(!empty($_GET["link")) {</FONT></SPAN>
<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">></FONT></SPAN>
<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">>Hagan</FONT></SPAN>
<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">>...snip...</FONT></SPAN>
<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">></FONT></SPAN>
<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">>Hagan,</FONT></SPAN>
<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">>That doesn't work... When I reload the page, I get a blank white </FONT></SPAN>
<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">>page...the recipe breaks the wiki.</FONT></SPAN>
<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">>-Josh</FONT></SPAN>
</P>
<P><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">If you just did a cut-n-paste, it looks to me like one of the parentheses got changed to a bracket. Does:</FONT></SPAN>
</P>
<P><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> if(!empty($_GET("link")) {</FONT></SPAN>
</P>
<P><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">work any better?</FONT></SPAN>
</P>
<P><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">Neil,</FONT></SPAN>
</P>
<P><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">No, it does the same thing.</FONT></SPAN>
</P>
<P><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">My guess is I'm having a problem using an if statement in the middle of the concatenations and assignments. Does that make sense? Here's the text again:</FONT></SPAN></P>
<P><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> $rcpage['text'] = $before.</FONT></SPAN>
<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> /* "\n$$$$\$default". pog? */</FONT></SPAN>
<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> "\n"</FONT></SPAN>
<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> ."(:if date "</FONT></SPAN>
<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> .StripCSlashes($_GET["srtdate"])</FONT></SPAN>
<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> .".."</FONT></SPAN>
<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> .StripCSlashes($_GET["enddate"])</FONT></SPAN>
<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> .":)"</FONT></SPAN>
<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> ."\n!"</FONT></SPAN>
<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> .StripCSlashes($_GET["header"])</FONT></SPAN>
<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> ."\n"</FONT></SPAN>
<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> .StripCSlashes($_GET['desc'])</FONT></SPAN>
<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> ."</FONT></SPAN><A HREF="file://\\\\"><SPAN LANG="en-us"><U><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">\\\\</FONT></U></SPAN></A><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">"</FONT></SPAN>
<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> ."\n"</FONT></SPAN>
<BR><SPAN LANG="en-us"><FONT COLOR="#FF0000" SIZE=2 FACE="Courier New"> # if($_GET["link"]!=""){</FONT></SPAN>
<BR><SPAN LANG="en-us"><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New"> ."&nbsp;&nbsp;[["</FONT></SPAN>
<BR><SPAN LANG="en-us"><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New"> .($_GET["link"])</FONT></SPAN>
<BR><SPAN LANG="en-us"><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New"> ."| &raquo;Click here for more]]"</FONT></SPAN>
<BR><SPAN LANG="en-us"><FONT COLOR="#FF0000" SIZE=2 FACE="Courier New"> # }</FONT></SPAN>
<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> ."\n"</FONT></SPAN>
<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> ."(:ifend:)"</FONT></SPAN>
<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> .$after;</FONT></SPAN>
<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> WritePage($pagename,$rcpage);</FONT></SPAN>
</P>
<P><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">If I comment out as indicated above, the wiki doesn't go blank (but the if statement is obviously ignored), so I'm left to believe that I'm either having a problem with the syntax of the if statement or the if statement can't go there….in which case, how do I set up a conditional? Anybody have any ideas?</FONT></SPAN></P>
<P><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">-Josh</FONT></SPAN>
</P>
</BODY>
</HTML>