<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: PHP Tertiary Statement &#8211; Using Tertiaries in PHP</title>
	<atom:link href="http://blog.cnizz.com/2007/04/21/php-the-tertiary-statement-and-other-php-musings/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.cnizz.com/2007/04/21/php-the-tertiary-statement-and-other-php-musings/</link>
	<description>my little notepad</description>
	<lastBuildDate>Mon, 06 Feb 2012 06:05:39 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: admin</title>
		<link>http://blog.cnizz.com/2007/04/21/php-the-tertiary-statement-and-other-php-musings/comment-page-1/#comment-871</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Thu, 26 Jul 2007 21:02:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.cnizz.com/blog/?p=41#comment-871</guid>
		<description>Another great use for this is inside an echo.  For instance:

echo &#039;Hello, &#039;.(($_SESSION[user]==&#039;&#039;)?&#039;you are not logged in, please login to view this content.&#039;:$_SESSION[user].&#039;, thank your for logging in today&#039;);

Thats free hand code, but you get the idea.</description>
		<content:encoded><![CDATA[<p>Another great use for this is inside an echo.  For instance:</p>
<p>echo &#8216;Hello, &#8216;.(($_SESSION[user]==&#8221;)?&#8217;you are not logged in, please login to view this content.&#8217;:$_SESSION[user].&#8217;, thank your for logging in today&#8217;);</p>
<p>Thats free hand code, but you get the idea.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: daws</title>
		<link>http://blog.cnizz.com/2007/04/21/php-the-tertiary-statement-and-other-php-musings/comment-page-1/#comment-470</link>
		<dc:creator>daws</dc:creator>
		<pubDate>Tue, 03 Jul 2007 14:04:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.cnizz.com/blog/?p=41#comment-470</guid>
		<description>The previous post had php tags, which your server didn&#039;t like.
Here is the code:
	//	Checks user/pass combo against hash table
	$userTable = array(
		&#039;daws&#039; =&gt; &#039;secret123&#039;,
		&#039;matt&#039; =&gt; &#039;passw3rd&#039;,
		&#039;john&#039; =&gt; &#039;rainbow33&amp;^&#039;
	);

	$user = &#039;daws&#039;;
	$pass = &#039;secret123&#039;;

	$loggedIn = array_key_exists($user, $userTable) &amp;&amp; $userTable[$user] == $pass;

	echo $loggedIn ? &quot;You are logged in as $user!&quot; : &quot;You have provided and invalid user/pass combo.&quot;;</description>
		<content:encoded><![CDATA[<p>The previous post had php tags, which your server didn&#8217;t like.<br />
Here is the code:<br />
	//	Checks user/pass combo against hash table<br />
	$userTable = array(<br />
		&#8216;daws&#8217; =&gt; &#8216;secret123&#8242;,<br />
		&#8216;matt&#8217; =&gt; &#8216;passw3rd&#8217;,<br />
		&#8216;john&#8217; =&gt; &#8216;rainbow33&amp;^&#8217;<br />
	);</p>
<p>	$user = &#8216;daws&#8217;;<br />
	$pass = &#8216;secret123&#8242;;</p>
<p>	$loggedIn = array_key_exists($user, $userTable) &amp;&amp; $userTable[$user] == $pass;</p>
<p>	echo $loggedIn ? &#8220;You are logged in as $user!&#8221; : &#8220;You have provided and invalid user/pass combo.&#8221;;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: daws</title>
		<link>http://blog.cnizz.com/2007/04/21/php-the-tertiary-statement-and-other-php-musings/comment-page-1/#comment-469</link>
		<dc:creator>daws</dc:creator>
		<pubDate>Tue, 03 Jul 2007 14:03:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.cnizz.com/blog/?p=41#comment-469</guid>
		<description> &#039;secret123&#039;,
		&#039;matt&#039; =&gt; &#039;passw3rd&#039;,
		&#039;john&#039; =&gt; &#039;rainbow33&amp;^&#039;
	);

	$user = &#039;daws&#039;;
	$pass = &#039;secret123&#039;;

	$loggedIn = array_key_exists($user, $userTable) &amp;&amp; $userTable[$user] == $pass;

	echo $loggedIn ? &quot;You are logged in as $user!&quot; : &quot;You have provided and invalid user/pass combo.&quot;;
?&gt;</description>
		<content:encoded><![CDATA[<p>&#8216;secret123&#8242;,<br />
		&#8216;matt&#8217; =&gt; &#8216;passw3rd&#8217;,<br />
		&#8216;john&#8217; =&gt; &#8216;rainbow33&amp;^&#8217;<br />
	);</p>
<p>	$user = &#8216;daws&#8217;;<br />
	$pass = &#8216;secret123&#8242;;</p>
<p>	$loggedIn = array_key_exists($user, $userTable) &amp;&amp; $userTable[$user] == $pass;</p>
<p>	echo $loggedIn ? &#8220;You are logged in as $user!&#8221; : &#8220;You have provided and invalid user/pass combo.&#8221;;<br />
?&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: josh</title>
		<link>http://blog.cnizz.com/2007/04/21/php-the-tertiary-statement-and-other-php-musings/comment-page-1/#comment-17</link>
		<dc:creator>josh</dc:creator>
		<pubDate>Wed, 02 May 2007 20:56:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.cnizz.com/blog/?p=41#comment-17</guid>
		<description>lots of good uses,basically just shortens the if/else stmt...
$msg = ($userId != &quot;&quot; ? &quot;Welcome $userName&quot; : &quot;put login link here&quot;);

Just sets your welcome msg to their user name if they are logged, and would display a link to the login page if not logged in.</description>
		<content:encoded><![CDATA[<p>lots of good uses,basically just shortens the if/else stmt&#8230;<br />
$msg = ($userId != &#8220;&#8221; ? &#8220;Welcome $userName&#8221; : &#8220;put login link here&#8221;);</p>
<p>Just sets your welcome msg to their user name if they are logged, and would display a link to the login page if not logged in.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

