<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Dave PC Guy &#187; blog</title>
	<atom:link href="http://www.davepcguy.com/archive/tag/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.davepcguy.com</link>
	<description>Computers and Technology</description>
	<lastBuildDate>Fri, 08 Apr 2011 15:01:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
		<item>
		<title>Setting up Feedburner Feeds</title>
		<link>http://www.davepcguy.com/archive/setting-up-feedburner-feeds/</link>
		<comments>http://www.davepcguy.com/archive/setting-up-feedburner-feeds/#comments</comments>
		<pubDate>Fri, 26 Mar 2010 05:09:53 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[General Articles]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[feed]]></category>
		<category><![CDATA[web extras]]></category>
		<category><![CDATA[webpage]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.davepcguy.com/?p=1167</guid>
		<description><![CDATA[Have you ever wondered about that pretty subscriber counter most blogs have on their pages? How do they know exactly how many people are following them? It&#8217;s called FeedBurner.  I&#8217;ve been using it for a while now and it never occurred to me how much POWER such a service can have! Not only are you]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fsetting-up-feedburner-feeds%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif&amp;source=clrkmck&amp;style=normal&amp;service_api=clrkmck%3AR_a73f58a91ed3515157df75ab6c37730f&amp;hashtags=blog,feed,web+extras,webpage,wordpress&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Have you ever wondered about that pretty subscriber counter most blogs have on their pages? How do they know exactly how many people are following them?</p>
<p>It&#8217;s called FeedBurner.  I&#8217;ve been using it for a while now and it never occurred to me how much POWER such a service can have! Not only are you provided with statistics, but you can add ads to the feed, get a counter, update twitter automatically, and a whole spectrum of other features.<span id="more-1167"></span></p>
<p>Here&#8217;s what I&#8217;m going to cover in this short tutorial:</p>
<ul>
<li>getting a FeedBurner Feed</li>
<li> Setting it up</li>
<li>incorporating the feed into your website.</li>
</ul>
<h3>Getting a Feed</h3>
<p>This is actually the easiest part. All you need is a google account and go<a title="FeedBurner" href="http://feedburner.google.com/"> here</a>. Once you&#8217;re at the dashboard, look over here:</p>
<p><a rel="attachment wp-att-1168" href="http://www.davepcguy.com/archive/setting-up-feedburner-feeds/burner1/"><img class="aligncenter size-full wp-image-1168" title="dashboard" src="http://www.davepcguy.com/wp-content/uploads/2010/03/burner1.jpg" alt="" width="500" height="149" /></a>Okay, now go to your blog site. I&#8217;m using one of my newer <a title="Living Smart Green" href="http://livingsmartgreen.com/">blogs</a> so just type in the URL.</p>
<ul>
<li>In my case, I typed in <strong>http://www.livingsmartgreen.com/ </strong>Click next.</li>
<li>If you have several RSS feeds available, such as RSS, RSS2, or Atom. Pick one of them. Click next.</li>
<li>The feed title and address should be already filled in, if not, just type those in. <a rel="attachment wp-att-1169" href="http://www.davepcguy.com/archive/setting-up-feedburner-feeds/burner2/"><img class="aligncenter size-full wp-image-1169" title="Feed" src="http://www.davepcguy.com/wp-content/uploads/2010/03/burner2.jpg" alt="" width="415" height="159" /></a></li>
<li>Click next. It should tell you that everything&#8217;s done! Click next anyways.</li>
<li>Check off all the boxes there for extra statistics. Next.</li>
</ul>
<p>Yay, now you&#8217;ve got your feed!</p>
<h3>Setting up that feed!</h3>
<p>You should be at the main feed page (not the dashboard). Here&#8217;s what mine looks like:</p>
<p><a rel="attachment wp-att-1170" href="http://www.davepcguy.com/archive/setting-up-feedburner-feeds/burner3/"><img class="aligncenter size-medium wp-image-1170" title="main site" src="http://www.davepcguy.com/wp-content/uploads/2010/03/burner3-300x126.jpg" alt="" width="300" height="126" /></a> Looks good so far. <a rel="attachment wp-att-1171" href="http://www.davepcguy.com/archive/setting-up-feedburner-feeds/burner4/"><img class="size-full wp-image-1171 alignleft" title="sidebar" src="http://www.davepcguy.com/wp-content/uploads/2010/03/burner4.jpg" alt="" width="197" height="447" /></a>The &#8220;analyze&#8221; part will not work just yet. You&#8217;ll have to wait for that so let&#8217;s skip to &#8220;publicize&#8221; the most important part. Here is the deal, FeedBurner offers A LOT of services, most of which you will never use. Some of them are truly just annoying services so don&#8217;t bother. Try them out, and have fun. Here are the essentials:</p>
<p>Go to &#8220;<strong>PingShot</strong>&#8221; first and activate it. There are some services that like to get notified whenever your RSS feed changes. This will boost your traffic, hopefully.</p>
<p>Next, go to &#8220;<strong>socialize</strong>&#8221; and add your twitter account if you want. Your feed will be reposted on twitter (thus you don&#8217;t have to use the WP&gt;twitter WordPress Plugin). Under &#8220;hash tags&#8221; choose the &#8220;Create hashtags&#8230;.&#8221; option. That&#8217;s all you need, activate the service and be on your way.</p>
<p>Go to &#8220;<strong>creative commons</strong>&#8221; and choose the appropriate license. This makes sure you retain the rights to your content. It&#8217;s a smart thing, trust me on this one.</p>
<p>As for the rest:</p>
<ul>
<li><strong>Headline Animator </strong>creates a banner that shows off your latest feeds as well as a link to your site.</li>
<li><strong>BuzzBoost</strong> does something similar, except it creates a gadget. If you have been following my blog for the past few months, I always had it in the left sidebar under the meta.</li>
<li><strong>Email subscription</strong>. Another nice gadget that lets users subscribe via e-mail rather than RSS. Try it out if you want to.</li>
<li><strong>FeedCount. </strong>Okay, this is everyone&#8217;s favorite. This is that little counter thing that tells everyone on your blog how many people are subscribe. If you want it to look fancier, I suggest you use <a title="Feedburner API" href="http://visionmasterdesigns.com/tutoral-display-noof-rss-readers-using-feedburner-api-and-php-curl/">this tutorial</a> to create your own little piece of PHP code and get an actual text value for the number of subscribers. You will probably have to enable the <strong>awareness API</strong> for this to work.</li>
<li><strong>Chicklet Chooser.</strong> Another nice gadget. This one is used for the actual Feed. If you don&#8217;t already have an RSS icon or want to use one of Feedburner&#8217;s pre-made icons, go ahead and activate this and customize your own icon. Copy the code, and paste it to your site where you want it.</li>
<li><strong>Password Protector and NoIndex.</strong> Password protector is used if you want to protect your feed from other people. ie. make it private. NoIndex makes sure your feed is not submitted to any search engine (I suggest against it.</li>
</ul>
<p>That&#8217;s pretty much it. If you go to <strong>optimize</strong>, you will be able to add some new functionality to your feed such as e-mail replies, images, and shortened URL&#8217;s. I don&#8217;t see the point in that so let&#8217;s move on. If you go to <strong>monetize</strong>, you will be asked to go to google&#8217;s <strong>AdSense</strong>. Log into there if you have an account set up. Go to <strong>AdSense Setup </strong>and add a Feed. Straightforward setup.</p>
<h3>WordPress/Blog Integration</h3>
<p>It&#8217;s easy to integrate your FeedBurner Feed into WordPress.  Go to Plugins &gt; Add New and serach for &#8220;FeedBurner&#8221;. Install and activate the plugin called: <strong>FD Feedburner Plugin. </strong>Moving on, under Plugins, you should find <strong>Feedburner Configuration</strong>. Go there. Here&#8217;s my setup:</p>
<p><a rel="attachment wp-att-1178" href="http://www.davepcguy.com/archive/setting-up-feedburner-feeds/feedburner/"><img class="aligncenter size-full wp-image-1178" title="FeedBurner" src="http://www.davepcguy.com/wp-content/uploads/2010/03/FeedBurner.jpg" alt="" width="552" height="388" /></a> I checked off two of those options, you don&#8217;t need to. It&#8217;s up to you. If you cannot remember the Feed URL, go back to that main page and click on the RSS button. Use that link:</p>
<p><a rel="attachment wp-att-1179" href="http://www.davepcguy.com/archive/setting-up-feedburner-feeds/feedburner2/"><img class="aligncenter size-medium wp-image-1179" title="feedburner2" src="http://www.davepcguy.com/wp-content/uploads/2010/03/feedburner2-300x41.jpg" alt="" width="300" height="41" /></a>Save the options and you&#8217;re done!</p>
<h3>What&#8217;s the next step?</h3>
<p>The next step is optimizing your feed, analyzing the data, and doing whatever. There are a lot of choices to make and a lot of features you can take advantage of. Just have fun and see what you can accomplish!<br />
</p>



Share and Enjoy:


	<a rel="nofollow"  target="_blank" href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fsetting-up-feedburner-feeds%2F&amp;partner=sociable" title="Print"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" /></a>
	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fsetting-up-feedburner-feeds%2F&amp;title=Setting%20up%20Feedburner%20Feeds&amp;bodytext=Have%20you%20ever%20wondered%20about%20that%20pretty%20subscriber%20counter%20most%20blogs%20have%20on%20their%20pages%3F%20How%20do%20they%20know%20exactly%20how%20many%20people%20are%20following%20them%3F%0D%0A%0D%0AIt%27s%20called%20FeedBurner.%20%C2%A0I%27ve%20been%20using%20it%20for%20a%20while%20now%20and%20it%20never%20occurred%20to%20me%20how%20m" title="Digg"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fsetting-up-feedburner-feeds%2F&amp;title=Setting%20up%20Feedburner%20Feeds&amp;notes=Have%20you%20ever%20wondered%20about%20that%20pretty%20subscriber%20counter%20most%20blogs%20have%20on%20their%20pages%3F%20How%20do%20they%20know%20exactly%20how%20many%20people%20are%20following%20them%3F%0D%0A%0D%0AIt%27s%20called%20FeedBurner.%20%C2%A0I%27ve%20been%20using%20it%20for%20a%20while%20now%20and%20it%20never%20occurred%20to%20me%20how%20m" title="del.icio.us"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fsetting-up-feedburner-feeds%2F&amp;t=Setting%20up%20Feedburner%20Feeds" title="Facebook"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fsetting-up-feedburner-feeds%2F&amp;title=Setting%20up%20Feedburner%20Feeds&amp;annotation=Have%20you%20ever%20wondered%20about%20that%20pretty%20subscriber%20counter%20most%20blogs%20have%20on%20their%20pages%3F%20How%20do%20they%20know%20exactly%20how%20many%20people%20are%20following%20them%3F%0D%0A%0D%0AIt%27s%20called%20FeedBurner.%20%C2%A0I%27ve%20been%20using%20it%20for%20a%20while%20now%20and%20it%20never%20occurred%20to%20me%20how%20m" title="Google Bookmarks"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fsetting-up-feedburner-feeds%2F&amp;title=Setting%20up%20Feedburner%20Feeds&amp;source=Dave+PC+Guy+Computers+and+Technology&amp;summary=Have%20you%20ever%20wondered%20about%20that%20pretty%20subscriber%20counter%20most%20blogs%20have%20on%20their%20pages%3F%20How%20do%20they%20know%20exactly%20how%20many%20people%20are%20following%20them%3F%0D%0A%0D%0AIt%27s%20called%20FeedBurner.%20%C2%A0I%27ve%20been%20using%20it%20for%20a%20while%20now%20and%20it%20never%20occurred%20to%20me%20how%20m" title="LinkedIn"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" /></a>
	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fsetting-up-feedburner-feeds%2F&amp;title=Setting%20up%20Feedburner%20Feeds" title="Reddit"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.tumblr.com/share?v=3&amp;u=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fsetting-up-feedburner-feeds%2F&amp;t=Setting%20up%20Feedburner%20Feeds&amp;s=Have%20you%20ever%20wondered%20about%20that%20pretty%20subscriber%20counter%20most%20blogs%20have%20on%20their%20pages%3F%20How%20do%20they%20know%20exactly%20how%20many%20people%20are%20following%20them%3F%0D%0A%0D%0AIt%27s%20called%20FeedBurner.%20%C2%A0I%27ve%20been%20using%20it%20for%20a%20while%20now%20and%20it%20never%20occurred%20to%20me%20how%20m" title="Tumblr"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/tumblr.png" title="Tumblr" alt="Tumblr" /></a>
	<a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=Setting%20up%20Feedburner%20Feeds%20-%20http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fsetting-up-feedburner-feeds%2F" title="Twitter"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" /></a>
	<a rel="nofollow"  target="_blank" href="mailto:?subject=Setting%20up%20Feedburner%20Feeds&amp;body=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fsetting-up-feedburner-feeds%2F" title="email"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" /></a>
	<a rel="nofollow"  target="_blank" href="http://slashdot.org/bookmark.pl?title=Setting%20up%20Feedburner%20Feeds&amp;url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fsetting-up-feedburner-feeds%2F" title="Slashdot"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/slashdot.png" title="Slashdot" alt="Slashdot" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fsetting-up-feedburner-feeds%2F&amp;title=Setting%20up%20Feedburner%20Feeds" title="StumbleUpon"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.davepcguy.com/archive/setting-up-feedburner-feeds/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>New Blogs (and Blog Types)</title>
		<link>http://www.davepcguy.com/archive/new-blogs-and-blog-types/</link>
		<comments>http://www.davepcguy.com/archive/new-blogs-and-blog-types/#comments</comments>
		<pubDate>Thu, 18 Mar 2010 00:36:34 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[blogging]]></category>
		<category><![CDATA[css]]></category>

		<guid isPermaLink="false">http://www.davepcguy.com/?p=1145</guid>
		<description><![CDATA[I am sure the readers of DavePCGuy have been wondering about this very long absence of articles. Well, the story is long and tedious but basically, all summed up, it&#8217;s because I have had TOO much to do. I&#8217;ve come up with an SEO system for my blogs so they get noticed as much as]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fnew-blogs-and-blog-types%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif&amp;source=clrkmck&amp;style=normal&amp;service_api=clrkmck%3AR_a73f58a91ed3515157df75ab6c37730f&amp;hashtags=blog,blogging,css&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>I am sure the readers of DavePCGuy have been wondering about this very long absence of articles. Well, the story is long and tedious but basically, all summed up, it&#8217;s because I have had TOO much to do. I&#8217;ve come up with an SEO system for my blogs so they get noticed as much as possible (ie. the use of proper plugins, ad placement, stuff like that). I&#8217;ve launched some of them but with minimal content.</p>
<p>I&#8217;ll be writing an SEO article on my finds later on this week, which will include the proper set up as well as use of those plugins. I&#8217;ll also get into editing WordPress themes to suit your needs. Here are a few types of blog themes most people are not aware of.<span id="more-1145"></span></p>
<p><strong>The Blog &#8220;types&#8221;</strong></p>
<p><strong>the tweak</strong></p>
<p>Well, last week, I launched a new blog. <a title="Rising Spirit" href="http://perfectlifetoday.com/">Check it out</a>.</p>
<p><a rel="attachment wp-att-1146" href="http://www.davepcguy.com/archive/new-blogs-and-blog-types/example/"><img class="aligncenter size-medium wp-image-1146" title="example" src="http://www.davepcguy.com/wp-content/uploads/2010/03/example-300x121.jpg" alt="" width="300" height="121" /></a>As you can see, there is a twitter and subscribe button on the top right. Well, the twitter button was not there. I added it manually, it may not seem like much, but these little additions here and there will change the look of the WHOLE theme. Little changes such as:</p>
<ul>
<li>custom footers</li>
<li>extra buttons (like the twitter button)</li>
<li>font color tweaks</li>
<li>background tweaks</li>
<li>adding CSS3</li>
</ul>
<p>And other, will improve the over-all appearance in ways you can&#8217;t imagine. It&#8217;s really nice when you know how to tweak the files right. I&#8217;ll show you the method in an upcoming article!</p>
<p><strong>light weight</strong></p>
<p>Another thing I want to talk about is the use of graphics in websites. I&#8217;ve always been all about light-weight coding and minimal graphics. Well, I&#8217;m saying, screw that. Here is an example of a light-weight blog theme:</p>
<p><a href="http://brokestudentloans.com/"><img class="aligncenter size-medium wp-image-1149" title="Broke Student Loans" src="http://www.davepcguy.com/wp-content/uploads/2010/03/Capture2-300x146.jpg" alt="" width="300" height="146" /></a>This <a title="broke student loans" href="http://brokestudentloans.com/">blog</a> contains only four different graphics. One is a pile of cash, the next one is the header, another is the background book shelves (a single one repeated, naturally), and the last one is a hover image for the header, and one more is on the bottom. The rest is CSS3. As you can see, I went all out with CSS3, trying out all the different effects in very different ways. My favorite so far is the content area where the blue lines seem to tighten around a certain area. I absolutely love it. I&#8217;ll talk about creating this effect in an upcoming post as well.</p>
<p><strong>graphic-heavy</strong></p>
<p>I was talking about the graphics, wasn&#8217;t I?</p>
<p>Well, here is an example of a graphic &#8220;heavy&#8221; blog theme:</p>
<p><a href="http://breakingipadnews.com/"><img class="aligncenter size-medium wp-image-1150" title="Breaking iPad News" src="http://www.davepcguy.com/wp-content/uploads/2010/03/Capture3-286x300.jpg" alt="" width="286" height="300" /></a>I say &#8220;heavy&#8221; in quotations because it is not as heavy as it may look. This <a title="Breaking Ipad News" href="http://breakingipadnews.com/">blog</a> theme is naturally meant for iPad-related content. It is made up of a repeating wood texture, the main iPad (the black part as well as the silver-ish border), the dock (just the grey part), the content background (ie. the apple), and the home button on the buttom and its hover. That may seem like a lot, but when you load the page, you&#8217;ll notice that it loads fairly quickly. The button on the bottom can be done entirely with CSS as can most of the shadows in the theme. The button actually uses a gradient background but that&#8217;s only because of the problems with internet explorer.</p>
<p>Again, the little things like the search bar on the bottom right ADDS a lot to the whole feel of the site. It&#8217;s actually my favorite part, and the easiest to code.</p>
<p><strong>the average blog</strong></p>
<p>The last type of a blog that I launched (just out of curiosity), is the average-looking blog. It&#8217;s not graphic-heavy nor is it very light-weight. I constructed it from the ground up so there is none exactly like it.</p>
<p><a href="http://livingsmartgreen.com/"><img class="aligncenter size-medium wp-image-1153" title="living smart green" src="http://www.davepcguy.com/wp-content/uploads/2010/03/Capture4-300x185.jpg" alt="" width="300" height="185" /></a>As you can see, it&#8217;s simple, it&#8217;s nice. And it&#8217;s meant for READING! It&#8217;s not cluttered. This<a title="Living Smart Green" href="http://livingsmartgreen.com/"> blog</a> is just&#8230;perfect for every day writing. Just like Dave PC Guy, it looks fancy enough but the most important part of this blog is the CONTENT.</p>
<p>There are many more blog types out there including those for magazines and such, but these are the most prominent among regular bloggers.</p>
<p>I&#8217;ll post on how to create these blog themes and such so enjoy!<br />
</p>



Share and Enjoy:


	<a rel="nofollow"  target="_blank" href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fnew-blogs-and-blog-types%2F&amp;partner=sociable" title="Print"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" /></a>
	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fnew-blogs-and-blog-types%2F&amp;title=New%20Blogs%20%28and%20Blog%20Types%29&amp;bodytext=I%20am%20sure%20the%20readers%20of%20DavePCGuy%20have%20been%20wondering%20about%20this%20very%20long%20absence%20of%20articles.%20Well%2C%20the%20story%20is%20long%20and%20tedious%20but%20basically%2C%20all%20summed%20up%2C%20it%27s%20because%20I%20have%20had%20TOO%20much%20to%20do.%20I%27ve%20come%20up%20with%20an%20SEO%20system%20for%20my%20blogs%20so" title="Digg"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fnew-blogs-and-blog-types%2F&amp;title=New%20Blogs%20%28and%20Blog%20Types%29&amp;notes=I%20am%20sure%20the%20readers%20of%20DavePCGuy%20have%20been%20wondering%20about%20this%20very%20long%20absence%20of%20articles.%20Well%2C%20the%20story%20is%20long%20and%20tedious%20but%20basically%2C%20all%20summed%20up%2C%20it%27s%20because%20I%20have%20had%20TOO%20much%20to%20do.%20I%27ve%20come%20up%20with%20an%20SEO%20system%20for%20my%20blogs%20so" title="del.icio.us"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fnew-blogs-and-blog-types%2F&amp;t=New%20Blogs%20%28and%20Blog%20Types%29" title="Facebook"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fnew-blogs-and-blog-types%2F&amp;title=New%20Blogs%20%28and%20Blog%20Types%29&amp;annotation=I%20am%20sure%20the%20readers%20of%20DavePCGuy%20have%20been%20wondering%20about%20this%20very%20long%20absence%20of%20articles.%20Well%2C%20the%20story%20is%20long%20and%20tedious%20but%20basically%2C%20all%20summed%20up%2C%20it%27s%20because%20I%20have%20had%20TOO%20much%20to%20do.%20I%27ve%20come%20up%20with%20an%20SEO%20system%20for%20my%20blogs%20so" title="Google Bookmarks"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fnew-blogs-and-blog-types%2F&amp;title=New%20Blogs%20%28and%20Blog%20Types%29&amp;source=Dave+PC+Guy+Computers+and+Technology&amp;summary=I%20am%20sure%20the%20readers%20of%20DavePCGuy%20have%20been%20wondering%20about%20this%20very%20long%20absence%20of%20articles.%20Well%2C%20the%20story%20is%20long%20and%20tedious%20but%20basically%2C%20all%20summed%20up%2C%20it%27s%20because%20I%20have%20had%20TOO%20much%20to%20do.%20I%27ve%20come%20up%20with%20an%20SEO%20system%20for%20my%20blogs%20so" title="LinkedIn"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" /></a>
	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fnew-blogs-and-blog-types%2F&amp;title=New%20Blogs%20%28and%20Blog%20Types%29" title="Reddit"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.tumblr.com/share?v=3&amp;u=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fnew-blogs-and-blog-types%2F&amp;t=New%20Blogs%20%28and%20Blog%20Types%29&amp;s=I%20am%20sure%20the%20readers%20of%20DavePCGuy%20have%20been%20wondering%20about%20this%20very%20long%20absence%20of%20articles.%20Well%2C%20the%20story%20is%20long%20and%20tedious%20but%20basically%2C%20all%20summed%20up%2C%20it%27s%20because%20I%20have%20had%20TOO%20much%20to%20do.%20I%27ve%20come%20up%20with%20an%20SEO%20system%20for%20my%20blogs%20so" title="Tumblr"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/tumblr.png" title="Tumblr" alt="Tumblr" /></a>
	<a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=New%20Blogs%20%28and%20Blog%20Types%29%20-%20http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fnew-blogs-and-blog-types%2F" title="Twitter"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" /></a>
	<a rel="nofollow"  target="_blank" href="mailto:?subject=New%20Blogs%20%28and%20Blog%20Types%29&amp;body=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fnew-blogs-and-blog-types%2F" title="email"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" /></a>
	<a rel="nofollow"  target="_blank" href="http://slashdot.org/bookmark.pl?title=New%20Blogs%20%28and%20Blog%20Types%29&amp;url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fnew-blogs-and-blog-types%2F" title="Slashdot"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/slashdot.png" title="Slashdot" alt="Slashdot" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fnew-blogs-and-blog-types%2F&amp;title=New%20Blogs%20%28and%20Blog%20Types%29" title="StumbleUpon"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.davepcguy.com/archive/new-blogs-and-blog-types/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>When your project fails&#8230;</title>
		<link>http://www.davepcguy.com/archive/when-your-project-fails/</link>
		<comments>http://www.davepcguy.com/archive/when-your-project-fails/#comments</comments>
		<pubDate>Sun, 31 Jan 2010 15:04:54 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[General Articles]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[webpage]]></category>

		<guid isPermaLink="false">http://www.davepcguy.com/?p=1088</guid>
		<description><![CDATA[A short what to do if your project fails. How to salvage the code, the files, and how to make the best of what happened]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fwhen-your-project-fails%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif&amp;source=clrkmck&amp;style=normal&amp;service_api=clrkmck%3AR_a73f58a91ed3515157df75ab6c37730f&amp;hashtags=blog,php,web+design,webpage&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>So, let&#8217;s say you&#8217;re working on a project. It&#8217;s filled with your blood, sweat, and tears. You&#8217;ve been working on it through nights, barely sleeping at night, drinking large amounts of coffee during the day to stay up. Putting all into it. But then everything goes wrong.</p>
<p>Well, we&#8217;ve all been there, many times. If you&#8217;re a web-developer, it&#8217;s a natural part of your life. It&#8217;s a natural part of mine too. Let me tell you my story.<br />
</p>
<p><span id="more-1088"></span></p>
<h1>What happened?</h1>
<p>Well, recently, I was working on two project. The first was a bust, the second was scrapped. The first was Only A Quote and the second was an independent blogging system.</p>
<p><a rel="attachment wp-att-1091" href="http://www.davepcguy.com/archive/when-your-project-fails/projects1/"><img class="aligncenter size-medium wp-image-1091" title="project" src="http://www.davepcguy.com/wp-content/uploads/2010/01/projects1-300x149.jpg" alt="" width="300" height="149" /></a></p>
<p>How was Only A Quote a bust? Well, it was not ENTIRELY a bust. It receives good traffic, there&#8217;s great Ad Sense yields. The design is wonderful and the PHP is amazing <img src='http://www.davepcguy.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  It gets good ratings Google-wise but it&#8217;s nothing to be REALLY excited over. It was an important project to me because I spent COUNTLESS hours perfecting the script, learning PHP, CSS, and HTML. Basically, I spent my holiday break sweating over this project. I expected to sell the website for close to a thousand dollars but after a month of auctioning, it all ended with a hundred dollar bid.</p>
<p>Terrible.</p>
<p><a rel="attachment wp-att-1092" href="http://www.davepcguy.com/archive/when-your-project-fails/projects2/"><img class="aligncenter size-medium wp-image-1092" title="projects" src="http://www.davepcguy.com/wp-content/uploads/2010/01/projects2-300x166.jpg" alt="" width="300" height="166" /></a></p>
<p>The next project was a blogging system for a customer. I created a custom design, interface. Really intuitive too! Let&#8217;s just say, it was a jewel to me. It wasn&#8217;t perfect, but let&#8217;s just say I spent A TON of time figuring it out. There were no directions as to what the project should look like but that&#8217;s okay. I made an administration secure from any threats. Well, the whole deal. Imagine a simple wordpress-like blogging system. But, the client didn&#8217;t like it so I scrapped it and created a wordpress theme instead.</p>
<p>There is one more &#8220;failure&#8221;. Well, this one was not so bad because I was never counting on it in the first place, but it was damn annoying that nothing came out of it.</p>
<p><a rel="attachment wp-att-1093" href="http://www.davepcguy.com/archive/when-your-project-fails/projects3/"><img class="aligncenter size-medium wp-image-1093" title="projects" src="http://www.davepcguy.com/wp-content/uploads/2010/01/projects3-300x153.jpg" alt="" width="300" height="153" /></a>My &#8220;Age Tester&#8221;. My first PHP application. Well, the problem was that I had no way to advertise it well, I had no good domain name. And let&#8217;s just say, I suck at designing stuff like this haha. It&#8217;s still fun or whatever, and I send <a title="Age Tester" href="http://test.davepcguy.com/scripts/agetester/final.php">a link</a> to my friends once in a while when they ask me if their partner is too old or too young for them. But that&#8217;s it.</p>
<h1>How to deal with it?</h1>
<p>It&#8217;s always hard to deal with failure, especially when you&#8217;re failing and you think it&#8217;s entirely unfair. I can admit that the only project -I- relied on was OnlyAQuote but I&#8217;m sure you have had your own experiences where you had to rely on multiple projects that went bust.</p>
<p>So, there is no easy way to say this other than, Just SCAVENGE the project. Strip it clean! It sounds silly, but think of every website you work on as a beautiful creation full of priceless parts. When that beautiful creation becomes a horrendous ugly thing, take it apart.</p>
<p>Let me use my Bodyshop project as an example:</p>
<p><a rel="attachment wp-att-1094" href="http://www.davepcguy.com/archive/when-your-project-fails/projects4/"><img class="aligncenter size-medium wp-image-1094" title="projects4" src="http://www.davepcguy.com/wp-content/uploads/2010/01/projects4-300x171.jpg" alt="" width="300" height="171" /></a>The website has 57 files and 18 folders. Most of which is code and pictures. Well, all of it. There must be something worth it in there.</p>
<p>First of all, I took apart the whole admin area of the site and salvaged the scripts for my own script library. I have an authentication script there, add to database scripts, blogging scripts, well, a bunch of stuff. I even have an upload form (and those come in handy) as well as a mailing script. All of this work, better not go to waste. I can use ALL of these for my next projects.</p>
<p>Streamlined, secure authentication takes time to create, and here I have it, already done. I have a login form as well, so that&#8217;s done. Admin scripts and the blog script are the most important parts to me but there is more.</p>
<p>I can also use some of the images for the future. I created my own texture (as seen in the snapshot way above) that I can use for other project (involving metal and such). I also have a pretty decent car cut-out silhouette which I won&#8217;t have to work on next time I do something involving cars.Oh, and I have a pretty button to use <img src='http://www.davepcguy.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a rel="attachment wp-att-1095" href="http://www.davepcguy.com/archive/when-your-project-fails/projects5/"><img class="aligncenter size-medium wp-image-1095" title="projects5" src="http://www.davepcguy.com/wp-content/uploads/2010/01/projects5-300x93.jpg" alt="" width="300" height="93" /></a></p>
<p>I couldn&#8217;t do the same for Only A Quote since I was selling the script, but I did bookmark all the scripts that were used from other programmers. (ie. web redirection)</p>
<p>All this takes is a bit of time, and tears that come along with stripping your project of its meat.</p>
<h1>Did you learn something?</h1>
<p>Making mistakes, and failure, it&#8217;s a process of learning! Did you learn something while making this project? I&#8217;m sure you have!</p>
<p>Now go write about it!</p>
<p>I&#8217;ve gotten some good traffic from the posts I based on the scripts I&#8217;ve written. Just check out this list:</p>
<ul>
<li><a title="Blogging System part 1" href="http://www.davepcguy.com/archive/creating-a-blogging-system-part-1/">Blogging system part 1</a></li>
<li><a title="Blogging System Part 2" href="http://www.davepcguy.com/archive/creating-a-blogging-system-part-2/">Blogging system part 2</a></li>
<li><a title="Mobile Website Tips" href="http://www.davepcguy.com/archive/mobile-websites-tips/">Mobile Site tips</a></li>
<li><a title="Database system" href="http://www.davepcguy.com/archive/bit-ly-api-and-adding-urls-to-your-mysql-database/">Shortlink API</a></li>
</ul>
<p>So, you&#8217;ve a lot of material you can write about. Plus, It&#8217;s rather nice if you share your secrets! Haha, I know I did. Some of this stuff took me a while to figure out, but, I got it down and now you can reap from my benefits, too.</p>
<p>Also, it sent a lot of traffic my way when I submitted these tutorials online. Double win! <img src='http://www.davepcguy.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h1>Conclusion</h1>
<p>Failures will teach you important lessons and can be salvagable, perhaps not to the original intent of goal, but good enough. Just, learn from your mistakes, okay? I know I did, and I&#8217;m sure you will too, over and over and over and over&#8230;again.<br />
</p>



Share and Enjoy:


	<a rel="nofollow"  target="_blank" href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fwhen-your-project-fails%2F&amp;partner=sociable" title="Print"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" /></a>
	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fwhen-your-project-fails%2F&amp;title=When%20your%20project%20fails...&amp;bodytext=A%20short%20what%20to%20do%20if%20your%20project%20fails.%20How%20to%20salvage%20the%20code%2C%20the%20files%2C%20and%20how%20to%20make%20the%20best%20of%20what%20happened" title="Digg"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fwhen-your-project-fails%2F&amp;title=When%20your%20project%20fails...&amp;notes=A%20short%20what%20to%20do%20if%20your%20project%20fails.%20How%20to%20salvage%20the%20code%2C%20the%20files%2C%20and%20how%20to%20make%20the%20best%20of%20what%20happened" title="del.icio.us"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fwhen-your-project-fails%2F&amp;t=When%20your%20project%20fails..." title="Facebook"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fwhen-your-project-fails%2F&amp;title=When%20your%20project%20fails...&amp;annotation=A%20short%20what%20to%20do%20if%20your%20project%20fails.%20How%20to%20salvage%20the%20code%2C%20the%20files%2C%20and%20how%20to%20make%20the%20best%20of%20what%20happened" title="Google Bookmarks"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fwhen-your-project-fails%2F&amp;title=When%20your%20project%20fails...&amp;source=Dave+PC+Guy+Computers+and+Technology&amp;summary=A%20short%20what%20to%20do%20if%20your%20project%20fails.%20How%20to%20salvage%20the%20code%2C%20the%20files%2C%20and%20how%20to%20make%20the%20best%20of%20what%20happened" title="LinkedIn"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" /></a>
	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fwhen-your-project-fails%2F&amp;title=When%20your%20project%20fails..." title="Reddit"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.tumblr.com/share?v=3&amp;u=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fwhen-your-project-fails%2F&amp;t=When%20your%20project%20fails...&amp;s=A%20short%20what%20to%20do%20if%20your%20project%20fails.%20How%20to%20salvage%20the%20code%2C%20the%20files%2C%20and%20how%20to%20make%20the%20best%20of%20what%20happened" title="Tumblr"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/tumblr.png" title="Tumblr" alt="Tumblr" /></a>
	<a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=When%20your%20project%20fails...%20-%20http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fwhen-your-project-fails%2F" title="Twitter"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" /></a>
	<a rel="nofollow"  target="_blank" href="mailto:?subject=When%20your%20project%20fails...&amp;body=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fwhen-your-project-fails%2F" title="email"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" /></a>
	<a rel="nofollow"  target="_blank" href="http://slashdot.org/bookmark.pl?title=When%20your%20project%20fails...&amp;url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fwhen-your-project-fails%2F" title="Slashdot"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/slashdot.png" title="Slashdot" alt="Slashdot" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fwhen-your-project-fails%2F&amp;title=When%20your%20project%20fails..." title="StumbleUpon"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.davepcguy.com/archive/when-your-project-fails/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Creating a Blogging System (Part 2)</title>
		<link>http://www.davepcguy.com/archive/creating-a-blogging-system-part-2/</link>
		<comments>http://www.davepcguy.com/archive/creating-a-blogging-system-part-2/#comments</comments>
		<pubDate>Mon, 18 Jan 2010 22:24:36 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[PHP and Scripting]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[functions]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://www.davepcguy.com/?p=1079</guid>
		<description><![CDATA[Okay, in my first tutorial, you learned about creating an install script for your blog as well as the entry form that will add your blogs. In this tutorial, I&#8217;ll teach you how to parse the data out for your audience and how to edit your entries. /* LET'S GET STARTED! */ Show off your]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcreating-a-blogging-system-part-2%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif&amp;source=clrkmck&amp;style=normal&amp;service_api=clrkmck%3AR_a73f58a91ed3515157df75ab6c37730f&amp;hashtags=blog,functions,mysql,php,server&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Okay, in my first <a title="blogging system part1" href="http://www.davepcguy.com/archive/creating-a-blogging-system-part-1/">tutorial</a>, you learned about creating an install script for your blog as well as the entry form that will add your blogs.</p>
<p>In this tutorial, I&#8217;ll teach you how to parse the data out for your audience and how to edit your entries.</p>
<pre class="brush: php; title: ;">
/* LET'S GET STARTED! */
</pre>
<p><span id="more-1079"></span><br />
</p>
<h1>Show off your stuff!</h1>
<p>Haha, let&#8217;s get into how to show your blog posts to your readers. First, we need some pagination. Search for some scripts or tutorials on google and see if you can find anything. We all like different styles of pagination, and I&#8217;m not particularly awesome in custom paginating. If you can&#8217;t find anything good, use <a title="pagination" href="http://www.phpeasystep.com/phptu/29.html">the code I use</a>, just don&#8217;t use the styles, you can create your own.</p>
<p>If you&#8217;re using the script I do, or some other one that&#8217;s similar, you won&#8217;t have any trouble following this tutorial. Actually, you won&#8217;t have any trouble doing that anyways. Just make sure that the last MySQL query before the <strong>while() </strong>loop looks something like this:</p>
<pre class="brush: php; title: ;">
$sql = &quot;SELECT * FROM $tbl_name ORDER BY id DESC LIMIT $start, $limit&quot;;
</pre>
<p>The important part of the query that we&#8217;re looking for is that &#8220;<strong>ORDER BY id DESC</strong>&#8221; part, it tells mysql to place the highest id in the front and the lowest in the back ie. the most recent posts will show at the beginning. The rest is up to the actual pagination script. If it doesn&#8217;t use limits, don&#8217;t worry about it. If you&#8217;re experiencing MySQL errors because of this, place the command elsewhere in the query, it should be close to the table_name selector.</p>
<p>Let&#8217;s move onto the <strong>while()</strong> loop. Every paginating script should ask you for the while loop, so let&#8217;s show them what we&#8217;ve got:</p>
<pre class="brush: php; title: ;">
	while($row = mysql_fetch_row($result)) {
		$content = stripslashes($row[3]);
		echo &quot;&lt;h1&gt;$row[1]&lt;/h1&gt;&quot;;
		echo &quot;&lt;h2&gt;$row[2]&lt;/h2&gt;&quot;;
		echo &quot;&lt;p&gt;.&quot;.$content.&quot;&lt;/p&gt;&quot;;
		echo &quot;&lt;br /&gt;&quot;;

	}
</pre>
<p>Simple enough? Let me explain it. The stuff inside the {} curly braces will repeat WHILE the stuff inside the () is true. Basically as long as there&#8217;s data present, what happens inside the curly braces will loop over and over. The insides of () basically mean that we&#8217;re storing data in the $row variable that corresponds to the $result from the previous $sql query. The function <strong>mysql_fetch_row</strong> just fetches the data and in the process puts it in the $row variable.</p>
<p>Do you remember our install script? This is what it looked like for our blog table:</p>
<pre class="brush: php; title: ;">
$query = &quot;CREATE TABLE blog
(
id int NOT NULL auto_increment primary key,
title blob NOT NULL,
date blob NOT NULL ,
content text NOT NULL
)&quot;;
</pre>
<p>Now, since in the computer language we start counting with 0 and not 1, it makes things a bit confusing. So column zero is id, column one is title etc. The inside of the while loop tells us to put column one as a title between &lt;h1&gt; tags, column two is the date and goes into &lt;h2&gt;tags, and column three is the content and goes into the &lt;p&gt; tags.</p>
<p>Now, I&#8217;ll assume that in my previous tutorial, you used the function <strong>mysql_real_escape_string()</strong> for escaping dangerous characters with the &#8220;\&#8221; backslash. Here&#8217;s where a problem arises. If you didn&#8217;t use the <strong>stripslashes()</strong> function you&#8217;d end up with something like this (example):</p>
<blockquote>
<h1>Here\&#8217;s the title</h1>
<h2>18-01-2010</h2>
<p>Here\&#8217;s the content of the blog. Aren\&#8217;t you excited? \:\)</p></blockquote>
<p>Okay, I don&#8217;t really think the smiley would be escaped like that but it could be! I don&#8217;t even bother with the rules anymore because it&#8217;s a lot easier to get it escaped with the function. The <strong>stripslashes()</strong> function is the opposite of the mysql_real_escape_string() function because all it does is take out the backslashes so the content looks proper. Remember that! It&#8217;s really important because you&#8217;ll be escaping A TON of strings!</p>
<p>But that&#8217;s it, give it some styling and you&#8217;ll have a lovely blog! <img src='http://www.davepcguy.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h1>Editing your Entries</h1>
<p>So, you can write and post blogs. Now what? Well, it&#8217;d be nice if you could edit those blogs just in case you made mistake, right?<br />
Well, let&#8217;s get on that. First, you&#8217;ll need to use the pagination script you used above in the SAME WAY, except with a different<strong> while()</strong> loop and some html before the loop. You can add this to the previous blog admin page where you added entries to the blog. It&#8217;s what I did.</p>
<p>Okay, so add the pagination script and this is what the while loop and the surrounding area looks like:</p>
<pre class="brush: php; title: ;">
&lt;?php
	echo &quot;&lt;table cellpadding=10 border=1&gt;&quot;;
	echo &quot;&lt;tr&gt;&quot;;
	echo &quot;&lt;td&gt;Id &lt;/td&gt;&quot;;
	echo &quot;&lt;td&gt;Title&lt;/td&gt;&quot;;
	echo &quot;&lt;td&gt;Date&lt;/td&gt;&quot;;
	echo &quot;&lt;td&gt;Delete&lt;/td&gt;&quot;;
	echo &quot;&lt;td&gt;Edit&lt;/td&gt;&quot;;
	echo &quot;&lt;/tr&gt;&quot;;

	while($row = mysql_fetch_row($result)) {
		$id = $row[0];
		echo &quot;&lt;tr&gt;&quot;;
        echo &quot;&lt;td&gt;$row[0]&lt;/td&gt;&quot;;
        echo &quot;&lt;td&gt;$row[1]&lt;/td&gt;&quot;;
        echo &quot;&lt;td&gt;$row[2]&lt;/td&gt;&quot;;
		echo &quot;&lt;td&gt;&lt;a href=\&quot;&quot;.$_SERVER['PHP_SELF'].&quot;?cmd=delete&amp;id=&quot;.$id.&quot;\&quot;&gt;Delete&lt;/a&gt;&lt;/td&gt;&quot;;
		echo &quot;&lt;td&gt;&lt;a href=\&quot;blogedit.php?id=&quot;.$id.&quot;\&quot;&gt;Edit&lt;/a&gt;&lt;/td&gt;&quot;;
		echo &quot;&lt;/tr&gt;&quot;;

	}
	echo &quot;&lt;/table&gt;&quot;;
?&gt;
</pre>
<p>Alright, what this basically does is create a table with the headings: id, title, date, delete, and edit. To that correspond the correct rows. Notice that I did not use <strong>stripslashes()</strong> on the entries, why? Because I honestly don&#8217;t care. You can use them, but for me, I just need to know the correct blog title, date, etc.</p>
<p>Onto, <strong>delete. </strong>Notice the URL, you&#8217;ll be adding &#8220;cmd=delete&amp;id=$id&#8221; to your original URL. What that is is basically manually adding GET information. Why do I do it this way? It&#8217;s easier than creating a complicated form with hidden values just for a pretty &#8220;delete&#8221; submit button. Next, you&#8217;ll notice that I&#8217;m doing the same thing with the GET but this time I am redirecting my page to a separate blogedit.php with the id information.</p>
<p>Let&#8217;s see how we can use that delete link first. I&#8217;m going to add a script at the beginning of the file that will DELETE this specific entry from the database.</p>
<pre class="brush: php; title: ;">
if ($_GET['cmd'] == &quot;delete&quot;)
{
	$id = $_GET['id'];
	$sql = &quot;DELETE FROM blog WHERE id=&quot;.$id;
    $result = mysql_query($sql);
    echo &quot;Blog &quot;.$id.&quot; deleted!&quot;;
}
</pre>
<p>What this says is basically that if the &#8220;cmd&#8221; $_GET variable is equal to &#8220;delete&#8221; then execute the loop. Inside the loop I defined the $id variable and used an SQL query that delete the entry. Notice that I did not mysql_real_escape_string() the $id variable. Once again, I am hoping that you know what you&#8217;re doing and that you won&#8217;t be purposely SQL injecting and messing up your database.</p>
<p>If you want more assurance that this got done (ie. the blog post got delete), you can make a separate if statement inside:</p>
<pre class="brush: php; title: ;">
if (isset($result)) {
     echo &quot;Blog &quot;.$id.&quot; deleted!&quot;;
}
else {
   echo &quot;Blog post: &quot;.$id.&quot; not deleted!&quot;;
}
</pre>
<p>Let&#8217;s move onto blogedit.php. Don&#8217;t forget to include the connection.php file.</p>
<p>This part should be pretty easy. Let&#8217;s start with a loop asking if you&#8217;re even on the right page (with the right information) and processing the data.</p>
<pre class="brush: php; title: ;">
if (isset($_GET['id'])){
		$id = mysql_real_escape_string($_GET['id']);
		$sql = &quot;SELECT * FROM blog WHERE id = '$id'&quot;;
		$result = mysql_query($sql) or die (&quot;Error in query: $query. &quot;.mysql_error());
		$row = mysql_fetch_row($result);
		}
</pre>
<p>This bit takes care of all the information. So yay! We&#8217;ve already executed the SQL to get the data and fetched it and stored inside the $row variable. I&#8217;ve mysql_real_escape_string() this one, but once again, it&#8217;s all up to you as to what you escape and what you don&#8217;t.With this done, we can move on to parse out the information in an editable form.</p>
<p>I want to be able to edit the blog the same way I edit in wordpress, or the way I add the blog. I just want the information to show up inside the appropriate fields!</p>
<p>Well, here&#8217;s how you do it:</p>
<pre class="brush: xml; title: ;">
   &lt;h2&gt;ID = &lt;?php echo $row[0];?&gt;&lt;/h2&gt;
    &lt;h2&gt;DATE = &lt;?php echo $row[2];?&gt;&lt;/h2&gt;
    &lt;form method=&quot;post&quot; action=&quot;&lt;?php echo $_SERVER['PHP_SELF'];?&gt;&quot;&gt;
    &lt;input type=&quot;text&quot; name=&quot;title&quot; value=&quot;&lt;?php echo $row[1]; ?&gt;&quot; size=&quot;100&quot; / &gt;&lt;br /&gt;
    &lt;textarea rows=&quot;25&quot; cols=&quot;125&quot; name=&quot;content&quot;&gt;&lt;?php echo stripslashes($row[3]);?&gt;&lt;/textarea&gt;
    &lt;input type=&quot;hidden&quot; name=&quot;id&quot; value=&quot;&lt;?php echo $row[0];?&gt;&quot; /&gt;
    &lt;br /&gt;
    &lt;input type=&quot;submit&quot; name=&quot;update&quot; value=&quot;Update&quot; /&gt;
    &lt;/form&gt;
</pre>
<p>Okay, first things first. I want the blog ID and Date. Echo it out, done! Next, we&#8217;ll create a form with a self action and with the post method (just like in the first tutorial, we don&#8217;t want long URLs because of GET requests). Next, we&#8217;ll use the same form we did for the blog entry form but, we add the corresponding values. Notice that I used stripslashes() for the content again. You don&#8217;t want to get everything double slashed in the end, you&#8217;d have to double stripslashes() for your readers. Anyways, i think the rest is self-explanatory. The data will show up in the appropriate fields, you can add it and press &#8220;update&#8221; to get everything done.</p>
<p>NEXT! The loop that will make ALL of this happen:</p>
<pre class="brush: php; title: ;">
if (isset($_POST['update'])) {
		$id = mysql_real_escape_string($_POST['id']);
		$title = mysql_real_escape_string($_POST['title']);
		$content = mysql_real_escape_string($_POST['content']);
		$sql = &quot;UPDATE blog SET title = '$title', content = '$content' WHERE id = '$id'&quot;;
		$result = mysql_query($sql) or die (&quot;Error in query: $query. &quot;.mysql_error());

		if ($result) {
			echo &quot;Blog id = $id updated&quot;;
		}

}
</pre>
<p>Yep, whenever you press that pretty &#8220;update&#8221; button, this will take place. The blog gets update with everything escaped as it should be. And, look! I finally have that $result loop there! It looks like even I learned something from this tutorial <img src='http://www.davepcguy.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h1>What&#8217;s up next?</h1>
<p>Well, in my next tutorial. I will FINALLY cover the login system and authorization stuff. It&#8217;s pretty easy but I want everyone to digest this info and ask away if you need anything!</p>
<h1>STUFF TO REMEMBER</h1>
<ul>
<li>Put <strong>include(connection.php); </strong>at the beginning of every SQL using file!</li>
<li>The <strong>while() </strong>loop puts all that data from your database to use!</li>
<li>MySQL columns are marked starting with ZERO, NOT ONE!</li>
<li>Use the <strong>stripslashes() </strong>function to counteract <strong>mysql_real_escape_string()</strong> function!</li>
<li>The ?id=23&amp;cmd=edit blah blah stuff is manually inserted GET variable information</li>
<li>Put all of the loops that do the hard work at the BEGINNING of the page!</li>
</ul>




Share and Enjoy:


	<a rel="nofollow"  target="_blank" href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcreating-a-blogging-system-part-2%2F&amp;partner=sociable" title="Print"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" /></a>
	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcreating-a-blogging-system-part-2%2F&amp;title=Creating%20a%20Blogging%20System%20%28Part%202%29&amp;bodytext=Okay%2C%20in%20my%20first%20tutorial%2C%20you%20learned%20about%20creating%20an%20install%20script%20for%20your%20blog%20as%20well%20as%20the%20entry%20form%20that%20will%20add%20your%20blogs.%0D%0A%0D%0AIn%20this%20tutorial%2C%20I%27ll%20teach%20you%20how%20to%20parse%20the%20data%20out%20for%20your%20audience%20and%20how%20to%20edit%20your%20entries.%0D%0A" title="Digg"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcreating-a-blogging-system-part-2%2F&amp;title=Creating%20a%20Blogging%20System%20%28Part%202%29&amp;notes=Okay%2C%20in%20my%20first%20tutorial%2C%20you%20learned%20about%20creating%20an%20install%20script%20for%20your%20blog%20as%20well%20as%20the%20entry%20form%20that%20will%20add%20your%20blogs.%0D%0A%0D%0AIn%20this%20tutorial%2C%20I%27ll%20teach%20you%20how%20to%20parse%20the%20data%20out%20for%20your%20audience%20and%20how%20to%20edit%20your%20entries.%0D%0A" title="del.icio.us"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcreating-a-blogging-system-part-2%2F&amp;t=Creating%20a%20Blogging%20System%20%28Part%202%29" title="Facebook"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcreating-a-blogging-system-part-2%2F&amp;title=Creating%20a%20Blogging%20System%20%28Part%202%29&amp;annotation=Okay%2C%20in%20my%20first%20tutorial%2C%20you%20learned%20about%20creating%20an%20install%20script%20for%20your%20blog%20as%20well%20as%20the%20entry%20form%20that%20will%20add%20your%20blogs.%0D%0A%0D%0AIn%20this%20tutorial%2C%20I%27ll%20teach%20you%20how%20to%20parse%20the%20data%20out%20for%20your%20audience%20and%20how%20to%20edit%20your%20entries.%0D%0A" title="Google Bookmarks"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcreating-a-blogging-system-part-2%2F&amp;title=Creating%20a%20Blogging%20System%20%28Part%202%29&amp;source=Dave+PC+Guy+Computers+and+Technology&amp;summary=Okay%2C%20in%20my%20first%20tutorial%2C%20you%20learned%20about%20creating%20an%20install%20script%20for%20your%20blog%20as%20well%20as%20the%20entry%20form%20that%20will%20add%20your%20blogs.%0D%0A%0D%0AIn%20this%20tutorial%2C%20I%27ll%20teach%20you%20how%20to%20parse%20the%20data%20out%20for%20your%20audience%20and%20how%20to%20edit%20your%20entries.%0D%0A" title="LinkedIn"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" /></a>
	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcreating-a-blogging-system-part-2%2F&amp;title=Creating%20a%20Blogging%20System%20%28Part%202%29" title="Reddit"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.tumblr.com/share?v=3&amp;u=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcreating-a-blogging-system-part-2%2F&amp;t=Creating%20a%20Blogging%20System%20%28Part%202%29&amp;s=Okay%2C%20in%20my%20first%20tutorial%2C%20you%20learned%20about%20creating%20an%20install%20script%20for%20your%20blog%20as%20well%20as%20the%20entry%20form%20that%20will%20add%20your%20blogs.%0D%0A%0D%0AIn%20this%20tutorial%2C%20I%27ll%20teach%20you%20how%20to%20parse%20the%20data%20out%20for%20your%20audience%20and%20how%20to%20edit%20your%20entries.%0D%0A" title="Tumblr"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/tumblr.png" title="Tumblr" alt="Tumblr" /></a>
	<a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=Creating%20a%20Blogging%20System%20%28Part%202%29%20-%20http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcreating-a-blogging-system-part-2%2F" title="Twitter"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" /></a>
	<a rel="nofollow"  target="_blank" href="mailto:?subject=Creating%20a%20Blogging%20System%20%28Part%202%29&amp;body=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcreating-a-blogging-system-part-2%2F" title="email"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" /></a>
	<a rel="nofollow"  target="_blank" href="http://slashdot.org/bookmark.pl?title=Creating%20a%20Blogging%20System%20%28Part%202%29&amp;url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcreating-a-blogging-system-part-2%2F" title="Slashdot"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/slashdot.png" title="Slashdot" alt="Slashdot" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcreating-a-blogging-system-part-2%2F&amp;title=Creating%20a%20Blogging%20System%20%28Part%202%29" title="StumbleUpon"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.davepcguy.com/archive/creating-a-blogging-system-part-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Creating a Blogging system (part 1)</title>
		<link>http://www.davepcguy.com/archive/creating-a-blogging-system-part-1/</link>
		<comments>http://www.davepcguy.com/archive/creating-a-blogging-system-part-1/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 02:26:53 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[PHP and Scripting]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[functions]]></category>
		<category><![CDATA[HTML/CSS]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://www.davepcguy.com/?p=1070</guid>
		<description><![CDATA[Some time ago (a couple weeks), I created my own blogging system. No one told me how to do it and I didn&#8217;t read any tutorials on how to do it either so there were a few things I learned the hard way. As you know, Blogs are database-based, they&#8217;re all entries in a table.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcreating-a-blogging-system-part-1%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif&amp;source=clrkmck&amp;style=normal&amp;service_api=clrkmck%3AR_a73f58a91ed3515157df75ab6c37730f&amp;hashtags=blog,functions,HTML%2FCSS,mysql,php,server&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Some time ago (a couple weeks), I created my own blogging system. No one told me how to do it and I didn&#8217;t read any tutorials on how to do it either so there were a few things I learned the hard way. As you know, Blogs are database-based, they&#8217;re all entries in a table.</p>
<p>You have an entry for the id, date, the content, and miscellaneous other information such as tags, and description. In this tutorial, I&#8217;d like to teach you how to do all that.</p>
<pre class="brush: php; title: ;">
/* LET'S GET STARTED!*/
</pre>
<p><span id="more-1070"></span><br />
</p>
<h1>Creating The Table</h1>
<p>For this tutorial, you&#8217;ll have to have your own database, and username. Set up a <a title="Setting up Part 1" href="http://www.davepcguy.com/archive/setting-up-part-1/">home server</a>, with WAMP, XAMPP or whatever else. Once you have that done, create that database, I&#8217;ll call mine &#8220;blog&#8221;.</p>
<p>I&#8217;m not going to get into how to do that, because if you&#8217;re doing this on a server online, you&#8217;ll need special instructions. Google it and set it up.</p>
<p>So, let&#8217;s create an INSTALL script. Make sure that when you use this script, delete it right after:</p>
<pre class="brush: php; title: ;">
&lt;?php

if (!isset($_POST['submit'])) {
?&gt;
&lt;form method=&quot;post&quot; action=&quot;&lt;?php echo $_SERVER['PHP_SELF']; ?&gt;&quot;&gt;
&lt;input type=&quot;submit&quot; name=&quot;submit&quot; value=&quot;Install&quot;&gt;
&lt;/form&gt;

&lt;?php
}
</pre>
<p>This creates an installing button. This is only for convenience. I don&#8217;t like scripts that automatically add new tables and such without control.</p>
<pre class="brush: php; title: ;">
else {
include ('connection.php');
</pre>
<p>This little bit will connect you to the database. Here&#8217;s what my connection.php looks like:</p>
<pre class="brush: php; title: ;">
&lt;?php
// MySQL variables
$host = 'localhost';
$user = 'username';
$pass = 'password';
$db = 'blog';

//connect
$connection = mysql_connect($host, $user, $pass) or die (&quot;Unable to connect!&quot;);
//database select
mysql_select_db($db) or die (&quot;Unable to select database!&quot;);
?&gt;
</pre>
<p>Great, now you&#8217;re in the system (btw, you&#8217;ll have to make your own username, password, database, and all that, just like I said you&#8217;d have to do. Let&#8217;s move on to creating your administration for your site:</p>
<pre class="brush: php; title: ;">
//creating a user table
$query = &quot;CREATE TABLE users
(
name varchar(15),
pass varchar(255)
)&quot;;

$result = mysql_query($query) or die (&quot;Error in query: $query. &quot;.mysql_error());

//making the user name
$password = md5('password you want to use');
$query=&quot;INSERT INTO users (name, pass)
VALUES
('admin', '$password')&quot;;

//query
$result = mysql_query($query) or die (&quot;Error in query: $query. &quot;.mysql_error());
</pre>
<p>Great, now you have a database entry for your user (that&#8217;s you!), I won&#8217;t get into having multiple users, right now. So bear with me. I&#8217;m using a md5 hash to make the password a bit harder to crack. Also, I&#8217;m using the usual &#8220;admin&#8221; for username. Let&#8217;s move on to the blog table:</p>
<pre class="brush: php; title: ;">
//creating a blog table
 $query = &quot;CREATE TABLE blog
(
id int NOT NULL auto_increment primary key,
title blob NOT NULL,
date blob NOT NULL ,
content text NOT NULL
)&quot;;
    // execute query
    $result = mysql_query($query) or die (&quot;Error in query: $query. &quot;.mysql_error());

$query = &quot;INSERT INTO blog (title, date, content) VALUES ('Welcome', 'May 5th', 'First blog entry! Aren\'t you excited?');
&quot;;
	// execute query
    $result = mysql_query($query) or die (&quot;Error in query: $query. &quot;.mysql_error());

mysql_close($connection);
echo &quot;Done&quot;;

}
</pre>
<p>With this, we just created a simple blog table that will have a specific id, date, title, and content. We&#8217;ve also added a dummy entry (with a date format I won&#8217;t be using by the way).<br />
If you&#8217;re wondering about the backslash in the word &#8220;Aren&#8217;t&#8221;, don&#8217;t wonder anymore. A backslash is used to &#8220;escape&#8221; characters that may hold a different meaning in the world of programming languages.<br />
For example, if I did not escape that character, I would probably get an error where the MySQL wonders what the &#8220;t you excited?&#8221; is about since the entry ended at &#8220;aren&#8217;&#8221;.</p>
<p>Before we go on, I would like to seriously address this. The best way to avoid an error is to use a well-known php function <strong>mysql_real_escape_string()</strong>. This function will automatically add backslashes to all potentially problematic characters. Also, if you use this function, don&#8217;t add extra backslashes because the function will escape those as well. There&#8217;s only one problem with that function but I&#8217;ll show you the solution later on.</p>
<h1>Coding the Entry</h1>
<p>Now, you&#8217;ll notice that while coding the entry, I&#8217;m leaving the system open to vulnerabilities, but that&#8217;s okay. Why is it okay? Well, unless you&#8217;re logged in, you won&#8217;t be able to get into the system. So you should be the only one who gets in there and adds entries.</p>
<p>You can screw up your entries by dropping tables and whatnot if you want to, but I&#8217;ll assume you won&#8217;t be making any crazy MySQL stuff. Also, you&#8217;ll have the above-mentioned function to protect you from any unfortunate mistakes.</p>
<p>First add the connection.php file using the <strong>include()</strong> function. Second, let&#8217;s create the form:</p>
<pre class="brush: xml; title: ;">
&lt;h2&gt;Add Blog Post&lt;/h2&gt;
     &lt;form method=&quot;post&quot; action=&quot;&lt;?php echo $_SERVER['PHP_SELF'];?&gt;&quot;&gt;
    &lt;input type=&quot;text&quot; name=&quot;title&quot; size=&quot;50&quot; / &gt;&lt;br /&gt;
    &lt;textarea name=&quot;content&quot; cols=&quot;150&quot; rows=&quot;20&quot;&gt;&lt;/textarea&gt;
    &lt;br /&gt;
    &lt;input type=&quot;submit&quot; name=&quot;addpost&quot; value=&quot;Add Post!&quot; /&gt;
    &lt;/form&gt;
</pre>
<p>Place this in the body of your html file, I know it sounds redundant and you should know about this stuff but I&#8217;m just making sure. What this form will do is send some information using the &#8220;post&#8221; method (ie. no URL mumbo jumbo like this: ?dkjw=fsjklwe&amp;fjskl=ewjk) No one wants a three thousand character URL up there (what browser would support that anyways?). You have two separate pieces of information: textarea (where your content goes) and input type=&#8221;text&#8221; (that&#8217;s the title). Anyways, put the next piece of code inside the &lt;head&gt; tag, or at least above the form.</p>
<pre class="brush: php; title: ;">if (isset($_POST['addpost'])) {
		$title = mysql_real_escape_string($_POST['title']);
		$content = mysql_real_escape_string($_POST['content']);
		$date = mysql_real_escape_string(date('m-d-Y'));
		$sql = &quot;INSERT INTO blog (title, date, content) VALUES ('$title', '$date', '$content')&quot;;
		$result = mysql_query($sql) or die (&quot;Error in query: $query. &quot;.mysql_error());

		if ($result) {
			echo &quot;Blog id = &quot;.$id.&quot; updated&quot;;
		}

}
</pre>
<p>Well, that&#8217;s some good stuff. The submit button in the form sent the post variable name &#8220;addpost&#8221; with the value &#8220;Add Post!&#8221;. The loop above goes into motion right when that post variable is submitted. I escaped all the strings just in case. Oh, if you didn&#8217;t know, you can use html, css, and all that other stuff in your posts. It won&#8217;t screw up anything, I promise <img src='http://www.davepcguy.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Anyways, you can see I used a date function to specify the date the blog was submitted. <a title="date function PHP manual" href="http://php.net/manual/en/function.date.php">Read </a>up more about it if you want to use a different time stamp. This one looks like this &#8220;1-13-2010&#8243;. We then added all the values we needed into the database. And voila, we just added our first entry!</p>
<h1>What&#8217;s next?</h1>
<p>In my next tutorial, I&#8217;ll show you how to correctly show all that data! I&#8217;ll also get into how to protect your administration sites and how to create the login site too.</p>
<h1>STUFF TO REMEMBER</h1>
<ul>
<li>MySQL uses a lot of special characters. To avoid an error use the<strong> mysql_real_escape_string() </strong>which will sanitize your entries to some extent. There&#8217;s one small problem with the function, but I&#8217;ll address that in the next tutorial</li>
<li>Use the <strong>include()</strong> function for your connection.php file for each site that connects to the MySQL database. It&#8217;s easier than rewriting the code numerous times (especially if you decide to change the user name and all that)</li>
<li>Delete the <strong>install.php </strong>installation script after you&#8217;re done. You don&#8217;t want anyone messing with your scripts. It also creates a vulnerability if you leave it on the server. If you think you&#8217;ll forget, get on PHPmyAdmin and do all the querying manually.</li>
<li>HAVE FUN!</li>
</ul>




Share and Enjoy:


	<a rel="nofollow"  target="_blank" href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcreating-a-blogging-system-part-1%2F&amp;partner=sociable" title="Print"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" /></a>
	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcreating-a-blogging-system-part-1%2F&amp;title=Creating%20a%20Blogging%20system%20%28part%201%29&amp;bodytext=Some%20time%20ago%20%28a%20couple%20weeks%29%2C%20I%20created%20my%20own%20blogging%20system.%20No%20one%20told%20me%20how%20to%20do%20it%20and%20I%20didn%27t%20read%20any%20tutorials%20on%20how%20to%20do%20it%20either%20so%20there%20were%20a%20few%20things%20I%20learned%20the%20hard%20way.%20As%20you%20know%2C%20Blogs%20are%20database-based%2C%20they%27re%20all" title="Digg"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcreating-a-blogging-system-part-1%2F&amp;title=Creating%20a%20Blogging%20system%20%28part%201%29&amp;notes=Some%20time%20ago%20%28a%20couple%20weeks%29%2C%20I%20created%20my%20own%20blogging%20system.%20No%20one%20told%20me%20how%20to%20do%20it%20and%20I%20didn%27t%20read%20any%20tutorials%20on%20how%20to%20do%20it%20either%20so%20there%20were%20a%20few%20things%20I%20learned%20the%20hard%20way.%20As%20you%20know%2C%20Blogs%20are%20database-based%2C%20they%27re%20all" title="del.icio.us"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcreating-a-blogging-system-part-1%2F&amp;t=Creating%20a%20Blogging%20system%20%28part%201%29" title="Facebook"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcreating-a-blogging-system-part-1%2F&amp;title=Creating%20a%20Blogging%20system%20%28part%201%29&amp;annotation=Some%20time%20ago%20%28a%20couple%20weeks%29%2C%20I%20created%20my%20own%20blogging%20system.%20No%20one%20told%20me%20how%20to%20do%20it%20and%20I%20didn%27t%20read%20any%20tutorials%20on%20how%20to%20do%20it%20either%20so%20there%20were%20a%20few%20things%20I%20learned%20the%20hard%20way.%20As%20you%20know%2C%20Blogs%20are%20database-based%2C%20they%27re%20all" title="Google Bookmarks"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcreating-a-blogging-system-part-1%2F&amp;title=Creating%20a%20Blogging%20system%20%28part%201%29&amp;source=Dave+PC+Guy+Computers+and+Technology&amp;summary=Some%20time%20ago%20%28a%20couple%20weeks%29%2C%20I%20created%20my%20own%20blogging%20system.%20No%20one%20told%20me%20how%20to%20do%20it%20and%20I%20didn%27t%20read%20any%20tutorials%20on%20how%20to%20do%20it%20either%20so%20there%20were%20a%20few%20things%20I%20learned%20the%20hard%20way.%20As%20you%20know%2C%20Blogs%20are%20database-based%2C%20they%27re%20all" title="LinkedIn"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" /></a>
	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcreating-a-blogging-system-part-1%2F&amp;title=Creating%20a%20Blogging%20system%20%28part%201%29" title="Reddit"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.tumblr.com/share?v=3&amp;u=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcreating-a-blogging-system-part-1%2F&amp;t=Creating%20a%20Blogging%20system%20%28part%201%29&amp;s=Some%20time%20ago%20%28a%20couple%20weeks%29%2C%20I%20created%20my%20own%20blogging%20system.%20No%20one%20told%20me%20how%20to%20do%20it%20and%20I%20didn%27t%20read%20any%20tutorials%20on%20how%20to%20do%20it%20either%20so%20there%20were%20a%20few%20things%20I%20learned%20the%20hard%20way.%20As%20you%20know%2C%20Blogs%20are%20database-based%2C%20they%27re%20all" title="Tumblr"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/tumblr.png" title="Tumblr" alt="Tumblr" /></a>
	<a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=Creating%20a%20Blogging%20system%20%28part%201%29%20-%20http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcreating-a-blogging-system-part-1%2F" title="Twitter"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" /></a>
	<a rel="nofollow"  target="_blank" href="mailto:?subject=Creating%20a%20Blogging%20system%20%28part%201%29&amp;body=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcreating-a-blogging-system-part-1%2F" title="email"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" /></a>
	<a rel="nofollow"  target="_blank" href="http://slashdot.org/bookmark.pl?title=Creating%20a%20Blogging%20system%20%28part%201%29&amp;url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcreating-a-blogging-system-part-1%2F" title="Slashdot"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/slashdot.png" title="Slashdot" alt="Slashdot" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcreating-a-blogging-system-part-1%2F&amp;title=Creating%20a%20Blogging%20system%20%28part%201%29" title="StumbleUpon"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.davepcguy.com/archive/creating-a-blogging-system-part-1/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>

