<!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 &quot; if &quot; 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 &quot; if &quot; control statement</FONT></SPAN>
</P>

<P><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">At 2006-03-23&nbsp; 10:41 AM -0500, Miller, Joshua is rumored to have said:</FONT></SPAN>

<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">&gt;Try</FONT></SPAN>

<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">&gt;</FONT></SPAN>

<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">&gt;&nbsp;&nbsp;&nbsp;&nbsp; if(!empty($_GET[&quot;link&quot;)) {</FONT></SPAN>

<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">&gt;</FONT></SPAN>

<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">&gt;Hagan</FONT></SPAN>

<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">&gt;...snip...</FONT></SPAN>

<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">&gt;</FONT></SPAN>

<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">&gt;Hagan,</FONT></SPAN>

<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">&gt;That doesn't work...&nbsp; When I reload the page, I get a blank white </FONT></SPAN>

<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">&gt;page...the recipe breaks the wiki.</FONT></SPAN>

<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">&gt;-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">&nbsp;&nbsp; if(!empty($_GET(&quot;link&quot;)) {</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.&nbsp; Does that make sense?&nbsp; Here's the text again:</FONT></SPAN></P>

<P><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $rcpage['text'] = $before.</FONT></SPAN>

<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /*&nbsp;&nbsp; &quot;\n$$$$\$default&quot;.&nbsp; pog? */</FONT></SPAN>

<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;\n&quot;</FONT></SPAN>

<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .&quot;(:if date &quot;</FONT></SPAN>

<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .StripCSlashes($_GET[&quot;srtdate&quot;])</FONT></SPAN>

<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .&quot;..&quot;</FONT></SPAN>

<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .StripCSlashes($_GET[&quot;enddate&quot;])</FONT></SPAN>

<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .&quot;:)&quot;</FONT></SPAN>

<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .&quot;\n!&quot;</FONT></SPAN>

<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .StripCSlashes($_GET[&quot;header&quot;])</FONT></SPAN>

<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .&quot;\n&quot;</FONT></SPAN>

<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .StripCSlashes($_GET['desc'])</FONT></SPAN>

<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .&quot;</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">&quot;</FONT></SPAN>

<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .&quot;\n&quot;</FONT></SPAN>

<BR><SPAN LANG="en-us"><FONT COLOR="#FF0000" SIZE=2 FACE="Courier New">&nbsp; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if($_GET[&quot;link&quot;]!=&quot;&quot;){</FONT></SPAN>

<BR><SPAN LANG="en-us"><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .&quot;&amp;nbsp;&amp;nbsp;[[&quot;</FONT></SPAN>

<BR><SPAN LANG="en-us"><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .($_GET[&quot;link&quot;])</FONT></SPAN>

<BR><SPAN LANG="en-us"><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .&quot;| &amp;raquo;Click here for more]]&quot;</FONT></SPAN>

<BR><SPAN LANG="en-us"><FONT COLOR="#FF0000" SIZE=2 FACE="Courier New">&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</FONT></SPAN>

<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .&quot;\n&quot;</FONT></SPAN>

<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .&quot;(:ifend:)&quot;</FONT></SPAN>

<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .$after;</FONT></SPAN>

<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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&#8230;.in which case, how do I set up a conditional?&nbsp; Anybody have any ideas?</FONT></SPAN></P>

<P><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">-Josh</FONT></SPAN>
</P>

</BODY>
</HTML>