<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>Jason Hunter</title>
	<atom:link href="http://hunterjm.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://hunterjm.com</link>
	<description>What Moves Me</description>
	<pubDate>Tue, 09 Sep 2008 08:50:24 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
	<language>en</language>
			<item>
		<title>Insomnia</title>
		<link>http://hunterjm.com/general/insomnia-effects-on-the-college-student/</link>
		<comments>http://hunterjm.com/general/insomnia-effects-on-the-college-student/#comments</comments>
		<pubDate>Tue, 09 Sep 2008 08:50:24 +0000</pubDate>
		<dc:creator>Jason Hunter</dc:creator>
		
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://hunterjm.com/?p=88</guid>
		<description><![CDATA[The title says it all. I have insomnia&#8230; which isn&#8217;t good since I have class in 3.5 hours and need my sleep.
What did I do with all my extra time. Well, right now I&#8217;m blogging from my living room TV.
Setup:

Old Dell Pentium IV Desktop
Ethernet Cable
40&#8243; LG 1080p HDTV
Male to Male VGA cable (one would think [...]]]></description>
			<content:encoded><![CDATA[<p>The title says it all. I have insomnia&#8230; which isn&#8217;t good since I have class in 3.5 hours and need my sleep.</p>
<p>What did I do with all my extra time. Well, right now I&#8217;m blogging from my living room TV.</p>
<p>Setup:</p>
<ul>
<li>Old Dell Pentium IV Desktop</li>
<li>Ethernet Cable</li>
<li>40&#8243; LG 1080p HDTV</li>
<li>Male to Male VGA cable (one would think the TV would have DVI too)</li>
</ul>
<p>Since I&#8217;m sitting on my couch a good 10 feet away, I&#8217;ve had to zoom in on the page so I wouldn&#8217;t strain my eyes trying to read the text, but it&#8217;s all good!</p>
<p>Now to try to sleep.</p>
]]></content:encoded>
			<wfw:commentRss>http://hunterjm.com/general/insomnia-effects-on-the-college-student/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Go Chrome!</title>
		<link>http://hunterjm.com/web/go-chrome/</link>
		<comments>http://hunterjm.com/web/go-chrome/#comments</comments>
		<pubDate>Tue, 02 Sep 2008 21:37:52 +0000</pubDate>
		<dc:creator>Jason Hunter</dc:creator>
		
		<category><![CDATA[Gadgets]]></category>

		<category><![CDATA[Web Development]]></category>

		<category><![CDATA[Browsers]]></category>

		<category><![CDATA[Google]]></category>

		<guid isPermaLink="false">http://hunterjm.com/?p=80</guid>
		<description><![CDATA[Google Chrome is the new open source web browser by Google.  Another web browser you say?!  Why?!  Google Chrome is apparently trying to streamline how media is displayed in today&#8217;s browsers.
The Internet has evolved.  Our means of viewing the content are still the same.  Google Chrome changes this.  I highly recommend EVERYONE to try Google&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.google.com/chrome" target="_blank">Google Chrome</a> is the new open source web browser by Google.  Another web browser you say?!  Why?!  Google Chrome is apparently trying to streamline how media is displayed in today&#8217;s browsers.</p>
<p>The Internet has evolved.  Our means of viewing the content are still the same.  Google Chrome changes this.  I highly recommend EVERYONE to try Google&#8217;s browser.  It is a statement more than anything.  It should push Microsoft into developing a more standards compliant browser, Mozilla (whom Google still backs financially) to re-think handling processes, and much more.  I really don&#8217;t think Google Chrome in itself will start a movement.  We, the consumers, need to say enough is enough.</p>
<p>Is Google Chrome perfect?  No.  Is Google Chrome comparable to Firefox or Opera?  No.  Even with all of it&#8217;s currently lacking features is it still innovative, unique, a STEP in the right direction?  That, would be yes.</p>
<p>Paul Reinheimer has the right idea in his post about &#8220;<a href="http://blog.preinheimer.com/index.php?/archives/277-Bringing-Browsers-up-to-speed.html" target="_blank">bringing browsers up to speed</a>&#8220;.  With my experience so far, Google has the closest answer.</p>
<p>Who knows, maybe we will see Chrome on Android.</p>
<p><a href="http://ptech.allthingsd.com/20080902/first-test-of-googles-new-browser/">Click Here</a> for a full review.</p>
]]></content:encoded>
			<wfw:commentRss>http://hunterjm.com/web/go-chrome/feed/</wfw:commentRss>
		</item>
		<item>
		<title>PHP: A Beginners Guide - End</title>
		<link>http://hunterjm.com/web/php/php-a-beginners-guide-end/</link>
		<comments>http://hunterjm.com/web/php/php-a-beginners-guide-end/#comments</comments>
		<pubDate>Sat, 30 Aug 2008 00:42:56 +0000</pubDate>
		<dc:creator>Jason Hunter</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://hunterjm.com/?p=78</guid>
		<description><![CDATA[I have decided that is is in my best interest to talk more about advanced topics instead of basics since the PHP Documentation covers all of the basics.  It is a good read, and I think everybody should at least read through it for a basic understanding.  From now on, I am going to go [...]]]></description>
			<content:encoded><![CDATA[<p>I have decided that is is in my best interest to talk more about advanced topics instead of basics since the <a href="http://us3.php.net/manual/en/index.php" target="_blank">PHP Documentation</a> covers all of the basics.  It is a good read, and I think everybody should at least read through it for a basic understanding.  From now on, I am going to go over more advanced topics on how to implement the functions and operators you learned from reading the documentation.</p>
]]></content:encoded>
			<wfw:commentRss>http://hunterjm.com/web/php/php-a-beginners-guide-end/feed/</wfw:commentRss>
		</item>
		<item>
		<title>PHP: A Beginners Guide - Part 3</title>
		<link>http://hunterjm.com/web/php/php-a-beginners-guide-part-3/</link>
		<comments>http://hunterjm.com/web/php/php-a-beginners-guide-part-3/#comments</comments>
		<pubDate>Thu, 28 Aug 2008 22:04:28 +0000</pubDate>
		<dc:creator>Jason Hunter</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://hunterjm.com/?p=64</guid>
		<description><![CDATA[Introduction
Today we will go over a more complex concept and really get our hands wet.  We are going to go over something that is the core of all server side dynamic websites.  Parsing form input.
For a little refresher I am going to define some terms that will be used throughout this article.
Form: The XHTML tag [...]]]></description>
			<content:encoded><![CDATA[<h3>Introduction</h3>
<p>Today we will go over a more complex concept and really get our hands wet.  We are going to go over something that is the core of all server side dynamic websites.  Parsing form input.</p>
<p>For a little refresher I am going to define some terms that will be used throughout this article.</p>
<p><strong>Form:</strong> The XHTML tag used to define the area of feild(s) where users can input values.<br />
<strong>Action:</strong> The URL the browser redirects to after the user submits the form (usually a script that processes the data).<br />
<strong>Method:</strong> The &#8220;method&#8221; used to submit the form to the server.<br />
<strong>GET:</strong> The form method where the input is sent through the URL (ex: process.php?FormName1=Value1&amp;FormName2=Value2).<br />
<strong>POST:</strong> The form method where the input is sent through a message body (hidden to end users).<br />
<strong>Query string:</strong> The portion of the url after the file extension which contains the data (ex ?FormName1=Value1&amp;FormName2=Value2).</p>
<p>Today we will discuss when to use GET or POST methods, how to send Data through the URL without a form, How to retrieve GET and POST data using PHP, and how to display the data on your web page.</p>
<p><span id="more-64"></span></p>
<p>You can download all the example files for today&#8217;s tutorial <a href="http://hunterjm.com/tutorials/downloads/phppart3.zip" target="_blank">here</a>.  You can also view it live by clicking <a href="http://hunterjm.com/tutorials/phppart3" target="_blank">here</a>.</p>
<h3>A Basic XHTML Form</h3>
<p>Below is an example of a simple HTML form.  It has an action url of &#8220;hello.php&#8221; and a method of POST.  As you can see, it also has two objects inside the form, a text box and a submit button.  The text box is named &#8220;name&#8221;.  This is an important tag as you will see later down the road.  For now, let&#8217;s name this file index.php.</p>
<blockquote><p>&lt;!DOCTYPE html PUBLIC <span style="color: #0000ff;">&#8220;-//W3C//DTD XHTML 1.0 Transitional//EN&#8221; &#8220;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#8221;</span>&gt;<br />
&lt;html xmlns=<span style="color: #0000ff;">&#8220;http://www.w3.org/1999/xhtml&#8221;</span>&gt;<br />
&lt;head&gt;<br />
&lt;meta http-equiv=<span style="color: #0000ff;">&#8220;Content-Type&#8221;</span> content=<span style="color: #0000ff;">&#8220;text/html; charset=utf-8&#8243;</span> /&gt;<br />
&lt;title&gt;PHP: A Beginners Guide - Part 3&lt;/title&gt;<br />
&lt;/head&gt;</p>
<p>&lt;body&gt;<br />
&lt;h1&gt;Welcome to My Website&lt;/h1&gt;<br />
&lt;p&gt;Please enter your name below to continue.&lt;/p&gt;<br />
<span style="color: #ff9900;">&lt;form action=<span style="color: #0000ff;">&#8220;hello.php&#8221;</span> method=<span style="color: #0000ff;">&#8220;post&#8221;</span>&gt;</span><br />
&lt;p&gt;<br />
<span style="color: #ff9900;">&lt;input type=<span style="color: #0000ff;">&#8220;text&#8221;</span> name=<span style="color: #0000ff;">&#8220;name&#8221;</span> /&gt;</span><br />
<span style="color: #ff9900;">&lt;input type=<span style="color: #0000ff;">&#8220;submit&#8221;</span> name=<span style="color: #0000ff;">&#8220;subForm&#8221;</span> /&gt;</span><br />
&lt;/p&gt;<br />
<span style="color: #ff9900;">&lt;/form&gt;</span><br />
&lt;/body&gt;<br />
&lt;/html&gt;</p></blockquote>
<p>Now that we have a form requesting that our user enters in his/her name, we need something to process that form.  This is where the file &#8220;hello.php&#8221; comes in.  In PHP, you retrieve the value the user entered by using the &#8220;$_POST&#8221; command.  To read more about the &#8220;$_POST&#8221; command, visit the <a href="http://us3.php.net/manual/en/reserved.variables.post.php" target="_blank">PHP Manual</a>.  Our &#8220;hello.php&#8221; file looks like this:</p>
<blockquote><p><span style="color: #ff0000;"><strong>&lt;?php</strong></span><br />
$name = <span style="color: #0000ff;">htmlspecialchars</span>(<span style="color: #0000ff;">$_POST</span>[<span style="color: #993300;">'name'</span>]);<br />
<span style="color: #ff0000;"><strong>?&gt;</strong></span><br />
&lt;!DOCTYPE html PUBLIC <span style="color: #0000ff;">&#8220;-//W3C//DTD XHTML 1.0 Transitional//EN&#8221; &#8220;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#8221;</span>&gt;<br />
&lt;html xmlns=<span style="color: #0000ff;">&#8220;http://www.w3.org/1999/xhtml&#8221;</span>&gt;<br />
&lt;head&gt;<br />
&lt;meta http-equiv=&#8221;<span style="color: #0000ff;">Content-Type</span>&#8221; content=&#8221;<span style="color: #0000ff;">text/html; charset=utf-8</span>&#8221; /&gt;<br />
&lt;title&gt;PHP: A Beginners Guide - Part 3&lt;/title&gt;<br />
&lt;/head&gt;</p>
<p>&lt;body&gt;<br />
&lt;h1&gt;Welcome, <strong><span style="color: #ff0000;">&lt;?=</span></strong> <span style="color: #000000;">$name</span> <strong><span style="color: #ff0000;">?&gt;</span></strong>&lt;/h1&gt;<br />
&lt;p&gt;We are so excited that you have decided to learn PHP with us! If you have any more questions, visit<br />
&lt;a href=<span style="color: #0000ff;">&#8220;http://www.hunterjm.com&#8221;</span>&gt;hunterjm.com&lt;/a&gt; for current tutorial updates!&lt;/p&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</p></blockquote>
<p>What we need to focus on here is the PHP at the top of the page.  In PHP, the <a href="http://us3.php.net/manual/en/function.htmlspecialchars.php" target="_blank">htmlspecialchars()</a> function allows us to replace characters such as &lt;, &gt;, &#8216;, etc. with their counterparts (&amp;lt;, &amp;gt;, &amp;#8216;).  This is so people cannot inject HTML code into your web page.</p>
<p>The most important part of this script of course is the &#8220;$_POST&#8221;.  In the above example, you see that post contains a string called &#8220;name&#8221; ( $_POST['name'] ).  This is the name of the input box we defined in our &#8220;index.php&#8221; page earlier.  What this command is doing is taking the value from that specific box, and <span style="color: #0000ff;">echo</span>ing it onto the page after &#8220;Welcome, &#8221; inside the h1 tag (remember the shortcut from <a href="http://hunterjm.com/web/php/php-a-beginners-guide-part-2">yesterday&#8217;s tutorial</a>?).</p>
<h3>Passing Data with GET</h3>
<p>Now that we have the user&#8217;s name, we may want to pass that, and other variables, to a different web page.  This can be done by placing the information into the query string.  The structure of a query string is simple.  The first variable is stated by a question mark ( ? ) directly after the file name in the URL.  The question mark is followed by the name of the variable, then an equal sign, finally followed by the value.  If you want to pass more than one variable, simply place an ampersand ( &amp; ) after the first variable.  Let&#8217;s expand upon our &#8220;hello.php&#8221; and ask the user whether they prefer cats or dogs.</p>
<blockquote><p><span style="color: #ff0000;"><strong>&lt;?php</strong></span><br />
$name = <span style="color: #0000ff;">htmlspecialchars</span>(<span style="color: #0000ff;">$_POST</span>[<span style="color: #993300;">'name'</span>]);<br />
<span style="color: #ff0000;"><strong>?&gt;</strong></span><br />
&lt;!DOCTYPE html PUBLIC <span style="color: #0000ff;">&#8220;-//W3C//DTD XHTML 1.0 Transitional//EN&#8221; &#8220;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#8221;</span>&gt;<br />
&lt;html xmlns=<span style="color: #0000ff;">&#8220;http://www.w3.org/1999/xhtml&#8221;</span>&gt;<br />
&lt;head&gt;<br />
&lt;meta http-equiv=<span style="color: #0000ff;">&#8220;Content-Type&#8221;</span> content=<span style="color: #0000ff;">&#8220;text/html; charset=utf-8&#8243;</span> /&gt;<br />
&lt;title&gt;PHP: A Beginners Guide - Part 3&lt;/title&gt;<br />
&lt;/head&gt;</p>
<p>&lt;body&gt;<br />
&lt;h1&gt;Welcome, <span style="color: #ff0000;"><strong>&lt;?=</strong></span> $name <span style="color: #ff0000;"><strong>?&gt;</strong></span>&lt;/h1&gt;<br />
&lt;p&gt;Which animal do you like the most?&lt;/p&gt;<br />
&lt;ul&gt;<br />
&lt;li&gt;&lt;a href=<span style="color: #0000ff;">&#8220;pet.php?name=</span><span style="color: #ff0000;"><strong>&lt;?=</strong></span> $name <span style="color: #ff0000;"><strong>?&gt;</strong></span><span style="color: #0000ff;">&amp;pet=cat&#8221;</span>&gt;cat&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=<span style="color: #0000ff;">&#8220;pet.php?name=</span><span style="color: #ff0000;"><strong>&lt;?=</strong></span> $name <span style="color: #ff0000;"><strong>?&gt;</strong></span><span style="color: #0000ff;">&amp;pet=dog&#8221;</span>&gt;dog&lt;/a&gt;&lt;/li&gt;<br />
&lt;/ul&gt;<br />
&lt;p&gt;We are so excited that you have decided to learn PHP with us! If you have any more questions, visit<br />
&lt;a href=<span style="color: #0000ff;">&#8220;http://www.hunterjm.com&#8221;</span>&gt;hunterjm.com&lt;/a&gt; for current tutorial updates!&lt;/p&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</p></blockquote>
<p>As you can see, I have added an unordered list to the &#8220;hello.php&#8221; file.  The text &#8220;cat&#8221; and &#8220;dog&#8221; are hyperlinks to the same page, but have different variables added to the end of them.  The first variable is named &#8220;name&#8221;, and the value is the same as the value the user entered in the previous form (we are just writing the value out).  The second value is named &#8220;pet&#8221; and the value changes depending on the link.  If the link is for the cat then the value is &#8220;cat&#8221;, and vice versa.  Lets now create &#8220;pet.php&#8221;.</p>
<blockquote><p><span style="color: #ff0000;"><strong>&lt;?php</strong></span><br />
$name = <span style="color: #0000ff;">htmlspecialchars</span>(<span style="color: #0000ff;">$_GET</span>[<span style="color: #993300;">'name'</span>]);<br />
$pet = <span style="color: #0000ff;">htmlspecialchars</span>(<span style="color: #0000ff;">$_GET</span>[<span style="color: #993300;">'pet'</span>]);<br />
<span style="color: #ff0000;"><strong>?&gt;</strong></span><br />
&lt;!DOCTYPE html PUBLIC <span style="color: #0000ff;">&#8220;-//W3C//DTD XHTML 1.0 Transitional//EN&#8221; &#8220;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#8221;</span>&gt;<br />
&lt;html xmlns=<span style="color: #0000ff;">&#8220;http://www.w3.org/1999/xhtml&#8221;</span>&gt;<br />
&lt;head&gt;<br />
&lt;meta http-equiv=<span style="color: #0000ff;">&#8220;Content-Type&#8221;</span> content=<span style="color: #0000ff;">&#8220;text/html; charset=utf-8&#8243;</span> /&gt;<br />
&lt;title&gt;PHP: A Beginners Guide - Part 3&lt;/title&gt;<br />
&lt;/head&gt;</p>
<p>&lt;body&gt;<br />
&lt;h1&gt;<span style="color: #ff0000;"><strong>&lt;?=</strong></span> $name <span style="color: #ff0000;"><strong>?&gt;</strong></span> is a <strong><span style="color: #ff0000;">&lt;?=</span></strong> $pet <strong><span style="color: #ff0000;">?&gt;</span></strong> person!&lt;/h1&gt;<br />
&lt;p&gt;We are so excited that you have decided to learn PHP with us! If you have any more questions, visit<br />
&lt;a href=<span style="color: #0000ff;">&#8220;http://www.hunterjm.com&#8221;</span>&gt;hunterjm.com&lt;/a&gt; for current tutorial updates!&lt;/p&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</p></blockquote>
<p>The first thing you should notice is that we are still using <a href="http://us3.php.net/manual/en/function.htmlspecialchars.php">htmlspecialchars()</a> but we have replaced &#8220;$_POST&#8221; with &#8220;$_GET&#8221;.  This tells it to look in the URL instead of the hidden POST message body.  Other than that, we are still doing everything the same as in &#8220;hello.php&#8221; by echoing the values out onto the page.</p>
<h3>Conclusion</h3>
<p>We have gone over one of the most important topics in PHP today.  Form values are used for almost everything you will want to do in PHP.  Tomorrow, I will start going over &#8220;if&#8221; statements, which will allow you to chose what is to be done based on conditions which may or may not exist.  Before you read tomorrow&#8217;s post, I highly recommend looking at the <a href="http://us3.php.net/manual/en/language.operators.comparison.php" target="_blank">comparison operators</a>.</p>
<p>Again, to download today&#8217;s tutorial click <a href="http://hunterjm.com/tutorials/downloads/phppart3.zip" target="_blank">here</a>.  You may also view it live <a href="http://hunterjm.com/tutorials/phppart3" target="_blank">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://hunterjm.com/web/php/php-a-beginners-guide-part-3/feed/</wfw:commentRss>
		</item>
		<item>
		<title>PHP: A Beginners Guide - Part 2</title>
		<link>http://hunterjm.com/web/php/php-a-beginners-guide-part-2/</link>
		<comments>http://hunterjm.com/web/php/php-a-beginners-guide-part-2/#comments</comments>
		<pubDate>Thu, 28 Aug 2008 01:00:20 +0000</pubDate>
		<dc:creator>Jason Hunter</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://hunterjm.com/?p=56</guid>
		<description><![CDATA[Today I am going to go over how to use PHP within XHTML to generate valid documents.  As I hope everyone knows, an example of an empty Transitional XHTML document is as below.
&#60;!DOCTYPE html PUBLIC &#8220;-//W3C//DTD XHTML 1.0 Transitional//EN&#8221; &#8220;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#8221;&#62;
&#60;html xmlns=&#8221;http://www.w3.org/1999/xhtml&#8221;&#62;
&#60;head&#62;
&#60;meta http-equiv=&#8221;Content-Type&#8221; content=&#8221;text/html; charset=utf-8&#8243; /&#62;
&#60;title&#62;Basic XHTML&#60;/title&#62;
&#60;/head&#62;
&#60;body&#62;
&#60;/body&#62;
&#60;/html&#62;

Let&#8217;s take the variables we learned about yesterday and convert [...]]]></description>
			<content:encoded><![CDATA[<p>Today I am going to go over how to use PHP within XHTML to generate valid documents.  As I hope everyone knows, an example of an empty Transitional XHTML document is as below.</p>
<blockquote><p>&lt;!DOCTYPE html PUBLIC &#8220;-//W3C//DTD XHTML 1.0 Transitional//EN&#8221; &#8220;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#8221;&gt;<br />
&lt;html xmlns=&#8221;http://www.w3.org/1999/xhtml&#8221;&gt;<br />
&lt;head&gt;<br />
&lt;meta http-equiv=&#8221;Content-Type&#8221; content=&#8221;text/html; charset=utf-8&#8243; /&gt;<br />
&lt;title&gt;Basic XHTML&lt;/title&gt;<br />
&lt;/head&gt;</p>
<p>&lt;body&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</p></blockquote>
<p><span id="more-56"></span></p>
<p>Let&#8217;s take the variables we learned about yesterday and convert the output to valid XHTML:</p>
<blockquote><p><strong><span style="color: #ff0000;">&lt;?php</span></strong><span style="color: #ff0000;"><br />
<span style="color: #0000ff;"><span style="color: #000000;">$myString = </span><span style="color: #000000;"><span style="color: #993300;">&#8220;This is a string&#8221;</span>;</span></span></span><span style="color: #ff0000;"><br />
<span style="color: #000000;">$myInteger = </span>0<span style="color: #000000;">;</span><br />
<span style="color: #000000;">$myDouble = <span style="color: #ff0000;">1.2345<span style="color: #000000;">;<br />
<span style="color: #ff0000;"><strong>?&gt;</strong></span></span></span></span></span></p>
<p>&lt;!DOCTYPE html PUBLIC &#8220;-//W3C//DTD XHTML 1.0 Transitional//EN&#8221; &#8220;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#8221;&gt;<br />
&lt;html xmlns=&#8221;http://www.w3.org/1999/xhtml&#8221;&gt;<br />
&lt;head&gt;<br />
&lt;meta http-equiv=&#8221;Content-Type&#8221; content=&#8221;text/html; charset=utf-8&#8243; /&gt;<br />
&lt;title&gt;PHP Part 2: Example 1&lt;/title&gt;<br />
&lt;/head&gt;</p>
<p>&lt;body&gt;<br />
&lt;p&gt;<br />
<span style="color: #ff0000;"><strong>&lt;?php</strong></span><br />
<span style="color: #0000ff;">echo</span> &#8220;<span style="color: #993300;">Your string is:</span> &#8221; . $myString;<span style="color: #000000;"><br />
<span style="color: #0000ff;">echo</span> &#8220;<span style="color: #993300;">&lt;br /&gt;</span>&#8220;;<br />
<span style="color: #0000ff;">echo</span> &#8220;<span style="color: #993300;">Your integer is:</span> &#8221; . $myInteger;<br />
</span><span style="color: #ff0000;"><span style="color: #000000;"><span style="color: #0000ff;">echo</span> &#8220;<span style="color: #993300;">&lt;br /&gt;</span>&#8220;;<br />
<span style="color: #0000ff;">echo</span> &#8220;<span style="color: #993300;">Your double is: </span>&#8221; . $myDouble;<br />
</span><strong>?&gt;<br />
</strong><span style="color: #000000;">&lt;/p&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</span></span></p></blockquote>
<p>The above output is an example of valid XHTML output.  To see it as a webpage, <a title="Example 1" href="http://hunterjm.com/tutorials/phppart2/ex1.php" target="_blank">click here</a>.</p>
<p>There is an echo shortcut in PHP which will make calling variables much easier.  This shortcut is <span style="color: #ff0000;"><strong>&lt;?= </strong><span style="color: #000000;">$myVar</span><strong> ?&gt;</strong></span>.  Let&#8217;s redo the above example using this shortcut.</p>
<blockquote><p><strong><span style="color: #ff0000;">&lt;?php</span></strong><span style="color: #ff0000;"><br />
<span style="color: #0000ff;"><span style="color: #000000;">$myString = </span><span style="color: #000000;"><span style="color: #993300;">&#8220;This is a string&#8221;</span>;</span></span></span><span style="color: #ff0000;"><br />
<span style="color: #000000;">$myInteger = </span>0<span style="color: #000000;">;</span><br />
<span style="color: #000000;">$myDouble = <span style="color: #ff0000;">1.2345<span style="color: #000000;">;<br />
<span style="color: #ff0000;"><strong>?&gt;</strong></span></span></span></span></span></p>
<p>&lt;!DOCTYPE html PUBLIC &#8220;-//W3C//DTD XHTML 1.0 Transitional//EN&#8221; &#8220;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#8221;&gt;<br />
&lt;html xmlns=&#8221;http://www.w3.org/1999/xhtml&#8221;&gt;<br />
&lt;head&gt;<br />
&lt;meta http-equiv=&#8221;Content-Type&#8221; content=&#8221;text/html; charset=utf-8&#8243; /&gt;<br />
&lt;title&gt;PHP Part 2: Example 1&lt;/title&gt;<br />
&lt;/head&gt;</p>
<p>&lt;body&gt;<br />
&lt;p&gt;<span style="color: #000000;">Your string is: <span style="color: #ff0000;"><strong>&lt;?=</strong></span> </span>$myString <strong><span style="color: #ff0000;">?&gt;</span></strong><span style="color: #000000;"><br />
<span style="color: #000000;">&lt;br /&gt;</span><br />
<span style="color: #000000;">Your integer is:</span> <span style="color: #ff0000;"><strong>&lt;?=</strong></span> $myInteger <strong><span style="color: #ff0000;">?&gt;</span></strong><br />
</span><span style="color: #ff0000;"><span style="color: #000000;"><span style="color: #000000;">&lt;br /&gt;</span><br />
<span style="color: #000000;">Your double is: </span><span style="color: #ff0000;"><strong>&lt;?=</strong></span> $myDouble <strong><span style="color: #ff0000;">?&gt;</span></strong></span><strong><br />
</strong><span style="color: #000000;">&lt;/p&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</span></span></p></blockquote>
<p>This is all for today.  I know it isn&#8217;t much more advanced than yesterday, but I thought I should talk about proper coding.  Tomorrow we will talk about Retrieving data from forms.</p>
]]></content:encoded>
			<wfw:commentRss>http://hunterjm.com/web/php/php-a-beginners-guide-part-2/feed/</wfw:commentRss>
		</item>
		<item>
		<title>PHP: A Beginners Guide - Part 1</title>
		<link>http://hunterjm.com/web/php/php-a-beginners-guide-part-1/</link>
		<comments>http://hunterjm.com/web/php/php-a-beginners-guide-part-1/#comments</comments>
		<pubDate>Tue, 26 Aug 2008 22:21:18 +0000</pubDate>
		<dc:creator>Jason Hunter</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://hunterjm.com/?p=38</guid>
		<description><![CDATA[I would like to start by stating there are many websites on the net which have very similar tutorials on PHP, and pretty much everything you can think of.  People, however, also learn in many different ways.  I am putting this guide together in a fashion which would have best helped me learn when I [...]]]></description>
			<content:encoded><![CDATA[<p>I would like to start by stating there are many websites on the net which have very similar tutorials on PHP, and pretty much everything you can think of.  People, however, also learn in many different ways.  I am putting this guide together in a fashion which would have best helped me learn when I was starting out.  That said, let&#8217;s begin.</p>
<p><span id="more-38"></span></p>
<p>PHP has both an opening and closing tag.  These tags usually begin at the first line of code, and are placed in a file with an extension of .php:</p>
<blockquote><p><strong><span style="color: #ff0000;">&lt;?php</span></strong></p></blockquote>
<blockquote><p><strong><span style="color: #ff0000;">?&gt;</span></strong></p></blockquote>
<p>The &#8220;echo&#8221; command is used to display output in PHP:</p>
<blockquote><p><span style="color: #ff0000;"><strong>&lt;?php</strong><br />
<span style="color: #0000ff;">echo<span style="color: #000000;">(<span style="color: #993300;">&#8220;Hello World!&#8221;</span>);</span></span><br />
<strong>?&gt;</strong></span></p></blockquote>
<p>Output:</p>
<blockquote><p>Hello World!</p></blockquote>
<p>Note how the echo command ends in a semicolon (;).  All lines in PHP should end with a semi-colon except for opening and closing PHP tags and those which begin and end with brackets ( {} ). (ex: loops, if/else statements, functions, classes)</p>
<p>Variables in PHP are defined by the $ symbol.  All variables are loose variables, and do not need a special typecasting, though available and is generally a good practice (details later).   PHP also does not require variables to be declared before being initialized.  For example:</p>
<blockquote><p><strong><span style="color: #ff0000;">&lt;?php</span></strong><span style="color: #ff0000;"><br />
<span style="color: #0000ff;"><span style="color: #000000;">$myString = </span><span style="color: #000000;"><span style="color: #993300;">&#8220;This is a string&#8221;</span>;</span></span></span><span style="color: #ff0000;"><br />
<span style="color: #000000;">$myInteger = </span>0<span style="color: #000000;">;</span><br />
<span style="color: #000000;">$myDouble = <span style="color: #ff0000;">1.2345<span style="color: #000000;">;</span></span></span><br />
<strong>?&gt;</strong></span></p></blockquote>
<p>You can echo your value using your variable name. Values are appended using a period (.).  For example:</p>
<blockquote><p><strong><span style="color: #ff0000;">&lt;?php</span></strong><span style="color: #ff0000;"><br />
<span style="color: #0000ff;"><span style="color: #000000;">$myString = </span><span style="color: #000000;"><span style="color: #993300;">&#8220;This is a string&#8221;</span>;</span></span></span><span style="color: #ff0000;"><br />
<span style="color: #000000;">$myInteger = </span>0<span style="color: #000000;">;</span><br />
<span style="color: #000000;">$myDouble = <span style="color: #ff0000;">1.2345<span style="color: #000000;">;</span></span></span></span></p>
<p><span style="color: #000000;"><span style="color: #0000ff;">echo</span> &#8220;<span style="color: #993300;">Your string is:</span> &#8221; . $myString;<br />
<span style="color: #0000ff;">echo</span> &#8220;<span style="color: #993300;">&lt;br /&gt;</span>&#8220;;<br />
<span style="color: #0000ff;">echo</span> &#8220;<span style="color: #993300;">Your integer is:</span> &#8221; . $myInteger;<br />
</span><span style="color: #ff0000;"><span style="color: #000000;"><span style="color: #0000ff;">echo</span> &#8220;<span style="color: #993300;">&lt;br /&gt;</span>&#8220;;<br />
<span style="color: #0000ff;">echo</span> &#8220;<span style="color: #993300;">Your double is: </span>&#8221; . $myDouble;</span><br />
<strong>?&gt;</strong></span></p></blockquote>
<p>Output:</p>
<blockquote><p>Your string is: This is a string<br />
Your integer is: 0<br />
Your double is: 1.2345</p></blockquote>
<p>That&#8217;s all for today.  Tomorrow I will go over how to use PHP within XHTML.  If there is any confusion, feel free to respond.</p>
]]></content:encoded>
			<wfw:commentRss>http://hunterjm.com/web/php/php-a-beginners-guide-part-1/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Android: The &#8220;open source&#8221; mobile OS</title>
		<link>http://hunterjm.com/gadgets/android-the-open-source-mobile-os/</link>
		<comments>http://hunterjm.com/gadgets/android-the-open-source-mobile-os/#comments</comments>
		<pubDate>Tue, 26 Aug 2008 03:13:37 +0000</pubDate>
		<dc:creator>Jason Hunter</dc:creator>
		
		<category><![CDATA[Gadgets]]></category>

		<category><![CDATA[Android]]></category>

		<category><![CDATA[Google]]></category>

		<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://hunterjm.com/?p=35</guid>
		<description><![CDATA[As some of you may know, Google is in the middle of building a mobile operating system to be placed on phones in order to compete with Apples iPhone.  This new OS is called Android.  There are many skeptics out there, and I have to say I am joining the ranks.

You may ask why&#8230; Well, [...]]]></description>
			<content:encoded><![CDATA[<p>As some of you may know, Google is in the middle of building a mobile operating system to be placed on phones in order to compete with Apples iPhone.  This new OS is called <a title="Android" href="http://code.google.com/android/" target="_blank">Android</a>.  There are many <a href="http://www.google.com/search?hl=en&amp;rlz=1B3GGGL_enUS268US268&amp;q=android+skeptic&amp;btnG=Search" target="_blank">skeptics</a> out there, and I have to say I am joining the ranks.</p>
<p><span id="more-35"></span></p>
<p>You may ask why&#8230; Well, as a PHP developer, I&#8217;m all for open source, that of course is loosely applied the term &#8220;free&#8221; most of the time.  But is Android really open source?  How much of a grip will Google keep a hold of on this phone?  Are wireless data transfer rates still going to be ungodly expensive (rhetorical as the answer is a resounding yes)?</p>
<p>Android, though a good idea, just doesn&#8217;t have enough information released on it yet.  Though what we do know is that it will have an app store similar to Apples iPhone.  This will control where and when you can download applications (not a very open-source view).  It is also supposed to have Google ads on the phone itself to &#8220;help lower phone and plan rates.&#8221;  WHO WANTS ADS ON THEIR PHONE!? (looks at the one person in the back left corner who raises his hand).  Enough said.</p>
<p>I really do hope Googles Android succedes.  I need a new phone, I need data transfer, and I am not willing to pay outrageous amounts of money for it.  Let&#8217;s just hope and pray my heroes (Google) can do this right!</p>
]]></content:encoded>
			<wfw:commentRss>http://hunterjm.com/gadgets/android-the-open-source-mobile-os/feed/</wfw:commentRss>
		</item>
		<item>
		<title>PHP Magazine</title>
		<link>http://hunterjm.com/web/php/php-magazine/</link>
		<comments>http://hunterjm.com/web/php/php-magazine/#comments</comments>
		<pubDate>Sun, 24 Aug 2008 20:11:39 +0000</pubDate>
		<dc:creator>Jason Hunter</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Learning]]></category>

		<category><![CDATA[Magazine]]></category>

		<guid isPermaLink="false">http://hunterjm.com/?p=32</guid>
		<description><![CDATA[I&#8217;ve recently subscribed to PHP Architect, a monthly magazine available in PDF and print formats, due to a recommendation from a friend.  In reading reviews, it seems that they cover topics which are not easily accessible by just doing a Google search.  I find this a little hard to believe, as I Google everything, and [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve recently subscribed to <a href="http://www.phparch.com">PHP Architect</a>, a monthly magazine available in PDF and print formats, due to a recommendation from a friend.  In reading reviews, it seems that they cover topics which are not easily accessible by just doing a Google search.  I find this a little hard to believe, as I Google everything, and always come up with an answer in short time.</p>
<p><span id="more-32"></span></p>
<p>The main reason I subscribed to this magazine is because it will probably force me to learn more.  I hate reading off my computer screen!  It&#8217;s like staring at a light bulb for hours on end.  I already look at one for 8 hours a day, I try not to during my leisure time.  Instead I stare at the TV (much better, I know).  To get back on topic.  When the magazine comes in the mail it will intrigue me and allow me to expand my knowledge.  I don&#8217;t use classes enough in my programming, making it not so object-oriented but still kinda-maybe.</p>
<p>As one of the most important things to do is to ever expand your knowledge, I have decided it was a safe investment.  If nothing else it will make for good bathroom material.</p>
]]></content:encoded>
			<wfw:commentRss>http://hunterjm.com/web/php/php-magazine/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Blog Installed</title>
		<link>http://hunterjm.com/general/blog-installed/</link>
		<comments>http://hunterjm.com/general/blog-installed/#comments</comments>
		<pubDate>Sat, 23 Aug 2008 07:08:06 +0000</pubDate>
		<dc:creator>Jason Hunter</dc:creator>
		
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://hunterjm.com/?p=3</guid>
		<description><![CDATA[There is one thing I don&#8217;t do very well, and that is keep all of my thoughts long enough to put them on paper.  I have installed this blog in order to hopefully help with this, as well as join the major trend that is sweeping the world (a little late, I know).

Let me tell [...]]]></description>
			<content:encoded><![CDATA[<p>There is one thing I don&#8217;t do very well, and that is keep all of my thoughts long enough to put them on paper.  I have installed this blog in order to hopefully help with this, as well as join the major trend that is sweeping the world (a little late, I know).</p>
<p><span id="more-3"></span></p>
<p>Let me tell you a little about me. My name is Jason Hunter, and I am a Web Developer.  Right now I work mainly with PHP/MySQL. The majority of my posts will be on that exact topic.  I also plan to keep those who are interested updated about my relationship and school (in private posts).  I enjoy many things such as spending time with my wonderful girlfriend, Kara Patterson.  I also love soccer, technology, and ellipses&#8230; go figure.</p>
<p>There is a little about me, and my blog.  If you are interested, that&#8217;s great.  If not, feel free to leave.</p>
]]></content:encoded>
			<wfw:commentRss>http://hunterjm.com/general/blog-installed/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
