<?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>Sudo Bash</title>
	<atom:link href="http://sudobash.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://sudobash.net</link>
	<description>By Geeks - For Geeks</description>
	<lastBuildDate>Sun, 06 May 2012 04:17:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Web Dev &gt; Handling dynamically created checkboxes</title>
		<link>http://sudobash.net/web-dev-handling-dynamically-created-checkboxes/</link>
		<comments>http://sudobash.net/web-dev-handling-dynamically-created-checkboxes/#comments</comments>
		<pubDate>Wed, 02 May 2012 18:00:25 +0000</pubDate>
		<dc:creator>Scott Rowley</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[checkbox]]></category>
		<category><![CDATA[dev]]></category>
		<category><![CDATA[dynamic]]></category>
		<category><![CDATA[form]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[web dev]]></category>

		<guid isPermaLink="false">http://sudobash.net/?p=1136</guid>
		<description><![CDATA[Ok, so let&#8217;s say I have a list of users in a database. I want to get that list out on the screen and allow someone to be able to use checkboxes to do something with each of those users. In this example we&#8217;re going to say we are deleting any users that have been [...]]]></description>
			<content:encoded><![CDATA[<p>Ok, so let&#8217;s say I have a list of users in a database.  I want to get that list out on the screen and allow someone to be able to use checkboxes to do something with each of those users.  In this example we&#8217;re going to say we are deleting any users that have been checked.  If you are not already familiar with building dynamic output from mysql then I suggest you first read over <a href='http://sudobash.net/web-dev-populate-phphtml-table-from-mysql-database/' />Web Dev > Populate PHP/HTML table from MySQL database</a></p>
<p>First we&#8217;ll build our form to show our users, in this example I&#8217;m actually building my list of users from a query to a mail server which gets returned to me first as a string.  I need to change this into an array so I&#8217;m going to use <a href='http://us3.php.net/manual/en/function.explode.php'>explode()</a>.  I&#8217;ll go through this all step by step so it&#8217;s easy to follow along and you can skip whatever parts you feel you are already familiar with.</p>
<p>So lets say the mail server returns this string to me of users:</p>
<pre class='brush: php;'>
$members_string = 'Bruce Chuck Jackie Jet';
echo "Members string is '$members_string'";
</pre>
<p>Which gives us an output of </p>
<pre>Members string is 'Bruce Chuck Jackie Jet'</pre>
<p>Since I want to loop through each of these members I need to first create an array that I can loop through, this is where explode() comes in.</p>
<pre class='brush: php;'>
// Members are separated by spaces, so explode on spaces
$members = explode(' ',$members_string);
</pre>
<p><span id="more-1136"></span><br />
Now we should have an array of members.  Let&#8217;s check our work and make sure we are getting what we expected.</p>
<pre class='brush: php;'>
print_r($members);
</pre>
<p>Which should give us an output of</p>
<pre>
Array (
         [0] => Bruce
         [1] => Chuck
         [2] => Jackie
         [3] => Jet
      )
</pre>
<p>Perfect! Our $members array is now ready for looping.  I am going to use a foreach() to go through each element of the array:</p>
<pre class='brush: php;'>
// Before we we enter the loop lets begin the table
echo "&lt;table&gt;";
// And we'll give it a header row so we know what each of these columns represents
echo "&lt;tr&gt;&lt;td&gt;Delete&lt;/td&gt;&lt;td&gt;Member&lt;/td&gt;&lt;/tr&gt;";
foreach($members as $member){
 echo "&lt;tr&gt;&lt;td&gt;&lt;input type='checkbox' value='".$member."' name='deletemember[]' /&gt;&lt;input type='hidden' value='".$num_subs."' name='count' /&gt;&lt;/td&gt;&lt;td&gt;$member&lt;/td&gt;&lt;/tr&gt;";
}
// We're out of the loop, let's add a submit button and close our table
&lt;tr&gt;&lt;td colspan=2&gt;&lt;input type='submit' value='Delete Checked' style='float: right;' name='deletemember_submit' /&gt;&lt;/td&gt;&lt;/tr&gt;
echo "&lt;/table&gt;";
</pre>
<p>Alright so now we have our table that should look something like this (my webpage automatically styled it because it&#8217;s a table &#8211; yours will be a little uglier:</p>
<table>
<tr>
<td>Delete</td>
<td>Member</td>
</tr>
<tr>
<td>
<input type='checkbox' value='Bruce' name='deletemember[]' />
<input type='hidden' value='4' name='count' /></td>
<td>Bruce</td>
</tr>
<tr>
<td>
<input type='checkbox' value='Chuck' name='deletemember[]' />
<input type='hidden' value='4' name='count' /></td>
<td>Chuck</td>
</tr>
<tr>
<td>
<input type='checkbox' value='Jackie' name='deletemember[]' />
<input type='hidden' value='4' name='count' /></td>
<td>Jackie</td>
</tr>
<tr>
<td>
<input type='checkbox' value='Jet' name='deletemember[]' />
<input type='hidden' value='4' name='count' /></td>
<td>Jet</td>
</tr>
<tr>
<td colspan=2>
<input type='submit' value='Delete Checked' style='float: right;' name='deletemember_submit' /></td>
</tr>
</table>
<p>Everything should look good now.  Let me explain a few things in what we just typed up here.</p>
<p> <strong>$member</strong>, this is the single entry for a member from the $members array (So in the first iteration the member is Bruce)<br />
 <strong>deletemember[]</strong>, this is the name of our checkbox, we are using the [] so that when we post our checkbox named deletemember will be pushed into an array we can loop through for processing each individual.<br />
 <strong>$num_subs</strong>, this is a count the number of elements in our $members array &#8211; in this particular example that number should be 4 because we know we have 4 members.</p>
<p>Now that we have everything setup on the form side we need to worry about what happens once the form is submitted.</p>
<p>Back up somewhere near the top of our file (so that it runs before the form is generated) we want to add the following code:</p>
<pre class='brush: php'>
if(isset($_POST['deletemember_submit'])){
   $count = $_POST['count'];
   if(isset($_POST['deletemember'])){
   $deletemember = $_POST['deletemember'];
   for($i=0;$i&lt;$count;$i++){
     if(isset($deletemember[$i])){
     echo "Deleting $deletemember[$i]";
     // Code to delete user
     }
    }
   }
  }
</pre>
<p>Let me explain what everything here does line by line&#8230;</p>
<ol>
<li>Checks to see if the form that controls deletions (the one we just made) has been submitted, if it has then it proceeds to Line 2</li>
<li>Sets the $count variable to what we had as our hidden variable $num_subs, which we assigned the name of &#8216;count&#8217;</li>
<li>Checks to see if any members have actually been marked for deletion (users could submit the form without anyone actually checked and it would throw a Notice if we didn&#8217;t check for this</li>
<li>Sets the $deletemember array to the array we created in $_POST['deletemember'] (via deletemember[])</li>
<li>This is our for loop, which has 3 parts.  $i starts at 0, then with each loop it tells it to continue while $i is less than $count (remember $i starts at 0, so the first time it runs $i will be 0 and $count will be 4, so by the time it ends $i will be 3 and $count 4), the last part says to increase $i once that looping has completed.</li>
<li>If the deletemember[$i] has actually been set to &#8220;on&#8221; (checked) then continue</li>
<li>Just an echo to check we are deleting the correct member</li>
<li>Whatever code you need to write to actually delete the member from wherever you retrieved it from.  You&#8217;ll probably also want to put in here something to check that your deletion from whatever system was successful or failed and report the outcome somewhere.</li>
</ol>
<p>That&#8217;s it!</p>
<div class="thanks_button_div" 
                  style="float: left; margin-right: 10px;"><div id="thanksButtonDiv_1136_2" style="background-image:url(http://sudobash.net/wp-content/plugins/thanks-you-counter-button/images/thanks_large_black.png); background-repeat:no-repeat; float: left; display: inline;"
                onmouseover="javascript:thankYouChangeButtonImage('thanksButtonDiv_1136_2', true);" 
                onmouseout="javascript:thankYouChangeButtonImage('thanksButtonDiv_1136_2', false);"
                onclick="javascript:thankYouChangeButtonImage('thanksButtonDiv_1136_2', false);" >
                <input type="button" onclick="thankYouButtonClick(1136, 'You left &ldquo;Thanks&rdquo; already for this post')" value="Thanks! 0"
                  class="thanks_button thanks_large thanks_black"
                  style="  font-family: Verdana, Arial, Sans-Serif; font-size: 14px; font-weight: normal;; color:#ffffff;"
                  id="thanksButton_1136_2" title="Click to left &ldquo;Thanks&rdquo; for this post"/>
             </div><div id="ajax_loader_1136_2" style="display:inline;visibility: hidden;"><img alt="ajax loader" src="http://sudobash.net/wp-content/plugins/thanks-you-counter-button/images/ajax-loader.gif" /></div></div>]]></content:encoded>
			<wfw:commentRss>http://sudobash.net/web-dev-handling-dynamically-created-checkboxes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web Dev &gt; PHP function, check if a MySQL table exists</title>
		<link>http://sudobash.net/web-dev-php-function-check-if-a-mysql-table-exists/</link>
		<comments>http://sudobash.net/web-dev-php-function-check-if-a-mysql-table-exists/#comments</comments>
		<pubDate>Tue, 01 May 2012 19:34:18 +0000</pubDate>
		<dc:creator>Scott Rowley</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[check]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[dev]]></category>
		<category><![CDATA[exists]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[table]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://sudobash.net/?p=1130</guid>
		<description><![CDATA[Note: This is NOT original sudobash.net code. This has been copied over from ElectricToolBox.com, full credit goes to him/her (I couldn&#8217;t find a name anywhere). The PHP function below gets passed in a tablename and an optional database name. If the database name is not passed in then it retrieves it using the MySQL function [...]]]></description>
			<content:encoded><![CDATA[<p>Note: This is NOT original sudobash.net code.  This has been copied over from <a href='http://www.electrictoolbox.com/check-if-mysql-table-exists/php-function/'>ElectricToolBox.com</a>, full credit goes to him/her (I couldn&#8217;t find a name anywhere).</p>
<p>The PHP function below gets passed in a tablename and an optional database name. If the database name is not passed in then it retrieves it using the MySQL function SELECT DATABASE(). It then queries the MySQL information schema to see if the table exists and then returns either true or false.</p>
<pre class='brush: php'>
function table_exists($tablename, $database = false) {

    if(!$database) {
        $res = mysql_query("SELECT DATABASE()");
        $database = mysql_result($res, 0);
    }

    $res = mysql_query("
        SELECT COUNT(*) AS count
        FROM information_schema.tables
        WHERE table_schema = '$database'
        AND table_name = '$tablename'
    ");

    return mysql_result($res, 0) == 1;

}
</pre>
<p>The PHP MySQL functions are used in the above example. A database connection is assumed and there is no error checking, but you can modify it to utilise whatever database library / abstraction layer you are using in your project and improve how you see fit.</p>
<p>To use the function you&#8217;d do something like this:</p>
<pre class='brush: php'>
if(table_exists('my_table_name')) {
    // do something
}
else {
    // do something else
}
</pre>
<p>and if you wanted to specify the database name as well (perhaps you are needing to query if the table exists in multiple databases other than the one you are currently connected to), you&#8217;d do this:</p>
<pre class='brush: php'>
if(table_exists('my_table_name', 'my_database_name')) {
    // do something
}
else {
    // do something else
}
</pre>
<div class="thanks_button_div" 
                  style="float: left; margin-right: 10px;"><div id="thanksButtonDiv_1130_2" style="background-image:url(http://sudobash.net/wp-content/plugins/thanks-you-counter-button/images/thanks_large_black.png); background-repeat:no-repeat; float: left; display: inline;"
                onmouseover="javascript:thankYouChangeButtonImage('thanksButtonDiv_1130_2', true);" 
                onmouseout="javascript:thankYouChangeButtonImage('thanksButtonDiv_1130_2', false);"
                onclick="javascript:thankYouChangeButtonImage('thanksButtonDiv_1130_2', false);" >
                <input type="button" onclick="thankYouButtonClick(1130, 'You left &ldquo;Thanks&rdquo; already for this post')" value="Thanks! 2"
                  class="thanks_button thanks_large thanks_black"
                  style="  font-family: Verdana, Arial, Sans-Serif; font-size: 14px; font-weight: normal;; color:#ffffff;"
                  id="thanksButton_1130_2" title="Click to left &ldquo;Thanks&rdquo; for this post"/>
             </div><div id="ajax_loader_1130_2" style="display:inline;visibility: hidden;"><img alt="ajax loader" src="http://sudobash.net/wp-content/plugins/thanks-you-counter-button/images/ajax-loader.gif" /></div></div>]]></content:encoded>
			<wfw:commentRss>http://sudobash.net/web-dev-php-function-check-if-a-mysql-table-exists/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WebDev &gt; Fixing Warning: &#8220;Headers already sent&#8221; &amp; &#8220;Cannot modify header information&#8221;</title>
		<link>http://sudobash.net/webdev-fixing-warning-headers-already-sent-cannot-modify-header-information/</link>
		<comments>http://sudobash.net/webdev-fixing-warning-headers-already-sent-cannot-modify-header-information/#comments</comments>
		<pubDate>Sun, 25 Mar 2012 02:58:15 +0000</pubDate>
		<dc:creator>Scott Rowley</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[already]]></category>
		<category><![CDATA[cannot]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[dos2unix]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[fixed]]></category>
		<category><![CDATA[fixing]]></category>
		<category><![CDATA[headers]]></category>
		<category><![CDATA[information]]></category>
		<category><![CDATA[modify]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[save]]></category>
		<category><![CDATA[sent]]></category>
		<category><![CDATA[test]]></category>
		<category><![CDATA[troubleshoot]]></category>
		<category><![CDATA[warning]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://sudobash.net/?p=1125</guid>
		<description><![CDATA[Eventually in your web development you may run into one of these annoying errors. What it typically means is that your browser is being sent some HTML before the PHP command header() and it&#8217;s causing your issue. Unfortunately there is no easy way to go about troubleshooting this other than following the logic through your [...]]]></description>
			<content:encoded><![CDATA[<p>Eventually in your web development you may run into one of these annoying errors.  What it typically means is that your browser is being sent some HTML before the PHP command header() and it&#8217;s causing your issue.  </p>
<p>Unfortunately there is no easy way to go about troubleshooting this other than following the logic through your code, hopefully you&#8217;ve saved &#038; tested recently and have a fairly short code to go troubleshooting with. In video games I learned early on to &#8220;Save early, save often&#8221;.  I&#8217;ve since modified that to my programming so that I remember to save early, save often but also &#8220;Test early, test often&#8221;.  Make little changes, then you know how much you need to go back and troubleshoot when there is an error.  Anyway, another less known cause of this issue is that you&#8217;ve got the dos character ^M inserted in your code.  This recently happened to me when I used FTP to download a website and then uploaded it somewhere else.  Somewhere along the line my windows PC decided my perfectly fine files should have some ^M inserted into some of the files.  As a result I got the &#8220;Headers already sent&#8221; error.  </p>
<p>I&#8217;d run into the error before but I knew that I hadn&#8217;t introduced any new code so I knew it couldn&#8217;t be any html being sent before the header() function.  After much googling and &#8220;facedesk&#8221;&#8216;ing I finally found that the dos character could also cause this error.  After a bit more googling I found that the easiest way to get rid of this is to simply run the following command and it will easily and quickly remove all of the dos characters (^M).</p>
<pre class='brush: bash;'>dos2unix your_messed_up_file.php</pre>
<p>I ran this command on the file and then tried my test again and just like that I was back to normal again <img src='http://sudobash.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div class="thanks_button_div" 
                  style="float: left; margin-right: 10px;"><div id="thanksButtonDiv_1125_2" style="background-image:url(http://sudobash.net/wp-content/plugins/thanks-you-counter-button/images/thanks_large_black.png); background-repeat:no-repeat; float: left; display: inline;"
                onmouseover="javascript:thankYouChangeButtonImage('thanksButtonDiv_1125_2', true);" 
                onmouseout="javascript:thankYouChangeButtonImage('thanksButtonDiv_1125_2', false);"
                onclick="javascript:thankYouChangeButtonImage('thanksButtonDiv_1125_2', false);" >
                <input type="button" onclick="thankYouButtonClick(1125, 'You left &ldquo;Thanks&rdquo; already for this post')" value="Thanks! 0"
                  class="thanks_button thanks_large thanks_black"
                  style="  font-family: Verdana, Arial, Sans-Serif; font-size: 14px; font-weight: normal;; color:#ffffff;"
                  id="thanksButton_1125_2" title="Click to left &ldquo;Thanks&rdquo; for this post"/>
             </div><div id="ajax_loader_1125_2" style="display:inline;visibility: hidden;"><img alt="ajax loader" src="http://sudobash.net/wp-content/plugins/thanks-you-counter-button/images/ajax-loader.gif" /></div></div>]]></content:encoded>
			<wfw:commentRss>http://sudobash.net/webdev-fixing-warning-headers-already-sent-cannot-modify-header-information/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WebDev &gt; Alternate table row color with PHP &amp; CSS</title>
		<link>http://sudobash.net/webdev-alternate-table-row-color-with-php-css/</link>
		<comments>http://sudobash.net/webdev-alternate-table-row-color-with-php-css/#comments</comments>
		<pubDate>Mon, 19 Mar 2012 17:28:27 +0000</pubDate>
		<dc:creator>Scott Rowley</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[echo]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[row]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[table]]></category>

		<guid isPermaLink="false">http://sudobash.net/?p=1119</guid>
		<description><![CDATA[&#60;style type='text/css'&#62; tr.odd { background: #d0d0d0; } &#60;/style&#62; echo &#60;?php '&#60;tr'.(($c = !$c)?' class="odd"':' class="even"').'&#62;'; ?&#62;]]></description>
			<content:encoded><![CDATA[<pre class='brush: html;'>
&lt;style type='text/css'&gt;
 tr.odd {
       background: #d0d0d0;
 }
&lt;/style&gt;
</pre>
<pre class='brush: html;'>
 echo &lt;?php '&lt;tr'.(($c = !$c)?' class="odd"':' class="even"').'&gt;'; ?&gt;
</pre>
<div class="thanks_button_div" 
                  style="float: left; margin-right: 10px;"><div id="thanksButtonDiv_1119_2" style="background-image:url(http://sudobash.net/wp-content/plugins/thanks-you-counter-button/images/thanks_large_black.png); background-repeat:no-repeat; float: left; display: inline;"
                onmouseover="javascript:thankYouChangeButtonImage('thanksButtonDiv_1119_2', true);" 
                onmouseout="javascript:thankYouChangeButtonImage('thanksButtonDiv_1119_2', false);"
                onclick="javascript:thankYouChangeButtonImage('thanksButtonDiv_1119_2', false);" >
                <input type="button" onclick="thankYouButtonClick(1119, 'You left &ldquo;Thanks&rdquo; already for this post')" value="Thanks! 1"
                  class="thanks_button thanks_large thanks_black"
                  style="  font-family: Verdana, Arial, Sans-Serif; font-size: 14px; font-weight: normal;; color:#ffffff;"
                  id="thanksButton_1119_2" title="Click to left &ldquo;Thanks&rdquo; for this post"/>
             </div><div id="ajax_loader_1119_2" style="display:inline;visibility: hidden;"><img alt="ajax loader" src="http://sudobash.net/wp-content/plugins/thanks-you-counter-button/images/ajax-loader.gif" /></div></div>]]></content:encoded>
			<wfw:commentRss>http://sudobash.net/webdev-alternate-table-row-color-with-php-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WebDev &gt; Allow PHP in WordPress Widgets</title>
		<link>http://sudobash.net/webdev-allow-php-in-wordpress-widgets/</link>
		<comments>http://sudobash.net/webdev-allow-php-in-wordpress-widgets/#comments</comments>
		<pubDate>Thu, 26 Jan 2012 19:03:47 +0000</pubDate>
		<dc:creator>Scott Rowley</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[allow]]></category>
		<category><![CDATA[functions]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[widget]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://sudobash.net/?p=1075</guid>
		<description><![CDATA[The following will allow for you to post PHP in your widgets: Place in your functions.php file Appearance > Editor > Theme Functions (functions.php) add_filter('widget_text', 'php_text', 99); function php_text($text) { if (strpos($text, '&#60;' . '?') !== false) { ob_start(); eval('?' . '&#62;' . $text); $text = ob_get_contents(); ob_end_clean(); } return $text; } Now you can [...]]]></description>
			<content:encoded><![CDATA[<p>The following will allow for you to post PHP in your widgets:</p>
<p>Place in your functions.php file<br />
 Appearance > Editor > Theme Functions (functions.php)</p>
<pre class='brush: php;'>
add_filter('widget_text', 'php_text', 99);

function php_text($text) {
 if (strpos($text, '&lt;' . '?') !== false) {
 ob_start();
 eval('?' . '&gt;' . $text);
 $text = ob_get_contents();
 ob_end_clean();
 }
 return $text;
}
</pre>
<p>Now you can place php code so long as its within its &lt;?php and ?&gt; tags.<br />
<a href="http://www.binaryturf.com/php-text-widget-php-wordpress-text-widget/">Credit</a></p>
<div class="thanks_button_div" 
                  style="float: left; margin-right: 10px;"><div id="thanksButtonDiv_1075_2" style="background-image:url(http://sudobash.net/wp-content/plugins/thanks-you-counter-button/images/thanks_large_black.png); background-repeat:no-repeat; float: left; display: inline;"
                onmouseover="javascript:thankYouChangeButtonImage('thanksButtonDiv_1075_2', true);" 
                onmouseout="javascript:thankYouChangeButtonImage('thanksButtonDiv_1075_2', false);"
                onclick="javascript:thankYouChangeButtonImage('thanksButtonDiv_1075_2', false);" >
                <input type="button" onclick="thankYouButtonClick(1075, 'You left &ldquo;Thanks&rdquo; already for this post')" value="Thanks! 1"
                  class="thanks_button thanks_large thanks_black"
                  style="  font-family: Verdana, Arial, Sans-Serif; font-size: 14px; font-weight: normal;; color:#ffffff;"
                  id="thanksButton_1075_2" title="Click to left &ldquo;Thanks&rdquo; for this post"/>
             </div><div id="ajax_loader_1075_2" style="display:inline;visibility: hidden;"><img alt="ajax loader" src="http://sudobash.net/wp-content/plugins/thanks-you-counter-button/images/ajax-loader.gif" /></div></div>]]></content:encoded>
			<wfw:commentRss>http://sudobash.net/webdev-allow-php-in-wordpress-widgets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WebDev &gt; CSS Stylings</title>
		<link>http://sudobash.net/webdev-css-stylings/</link>
		<comments>http://sudobash.net/webdev-css-stylings/#comments</comments>
		<pubDate>Wed, 25 Jan 2012 16:55:10 +0000</pubDate>
		<dc:creator>Scott Rowley</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[dev]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[info]]></category>
		<category><![CDATA[information]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://sudobash.net/?p=1065</guid>
		<description><![CDATA[Just starting to make a note of some of my CSS creations: Informational Box SudoBash is proud to announce our newest office location 123 Kittens Street conveniently located 1 mile from LOLcat lane. &#60;style type='text/css'&#62; .info { border: 2px solid #D8D8D8; margin: 10px 0px; background-repeat: no-repeat; padding: 10px 0 10px 150px; background-position: 10px center; color: [...]]]></description>
			<content:encoded><![CDATA[<p>Just starting to make a note of some of my CSS creations:</p>
<p><strong>Informational Box</strong></p>
<style type='text/css'>
.info {
  border: 2px solid #D8D8D8;
  margin: 10px 0px;
  background-repeat: no-repeat;
  padding: 10px 0 10px 150px;
  background-position: 10px center;
  color: #00529B;
  background-color: #E0E0E0;
  background-image: url('http://www.employmentlawyernewyork.com/images/info.png');
}
</style>
<div class="info"><strong>SudoBash is proud to announce our newest office location</strong></p>
<p>123 Kittens Street conveniently located 1 mile from LOLcat lane.</p></div>
<pre class='brush: html'>
 &lt;style type='text/css'&gt;
.info {
  border: 2px solid #D8D8D8;
  margin: 10px 0px;
  background-repeat: no-repeat;
  padding: 10px 0 10px 150px;
  background-position: 10px center;
  color: #00529B;
  background-color: #E0E0E0;
  background-image: url('/images/info.png');
}
&lt;/style&gt;

&lt;div class="info"&gt;&lt;strong&gt;SudoBash is proud to announce our newest office location&lt;/strong&gt;&lt;br&gt;&lt;br&gt;

123 Kittens Street conveniently located 1 mile from LOLcat lane.&lt;/div&gt;
</pre>
<div class="thanks_button_div" 
                  style="float: left; margin-right: 10px;"><div id="thanksButtonDiv_1065_2" style="background-image:url(http://sudobash.net/wp-content/plugins/thanks-you-counter-button/images/thanks_large_black.png); background-repeat:no-repeat; float: left; display: inline;"
                onmouseover="javascript:thankYouChangeButtonImage('thanksButtonDiv_1065_2', true);" 
                onmouseout="javascript:thankYouChangeButtonImage('thanksButtonDiv_1065_2', false);"
                onclick="javascript:thankYouChangeButtonImage('thanksButtonDiv_1065_2', false);" >
                <input type="button" onclick="thankYouButtonClick(1065, 'You left &ldquo;Thanks&rdquo; already for this post')" value="Thanks! 0"
                  class="thanks_button thanks_large thanks_black"
                  style="  font-family: Verdana, Arial, Sans-Serif; font-size: 14px; font-weight: normal;; color:#ffffff;"
                  id="thanksButton_1065_2" title="Click to left &ldquo;Thanks&rdquo; for this post"/>
             </div><div id="ajax_loader_1065_2" style="display:inline;visibility: hidden;"><img alt="ajax loader" src="http://sudobash.net/wp-content/plugins/thanks-you-counter-button/images/ajax-loader.gif" /></div></div>]]></content:encoded>
			<wfw:commentRss>http://sudobash.net/webdev-css-stylings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BASH &gt; Recursively set file/directory permissions</title>
		<link>http://sudobash.net/bash-recursively-set-filedirectory-permissions/</link>
		<comments>http://sudobash.net/bash-recursively-set-filedirectory-permissions/#comments</comments>
		<pubDate>Thu, 19 Jan 2012 17:09:53 +0000</pubDate>
		<dc:creator>Scott Rowley</dc:creator>
				<category><![CDATA[BASH]]></category>
		<category><![CDATA[chmod]]></category>
		<category><![CDATA[chmodding]]></category>
		<category><![CDATA[directory]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[files]]></category>
		<category><![CDATA[find]]></category>
		<category><![CDATA[permission]]></category>
		<category><![CDATA[recursive]]></category>
		<category><![CDATA[recursively]]></category>
		<category><![CDATA[set]]></category>
		<category><![CDATA[type]]></category>

		<guid isPermaLink="false">http://sudobash.net/?p=1053</guid>
		<description><![CDATA[Move to the directory you want to start chmodding files in and run the following: Recursively set FILE permissions. find . -type f -exec chmod 644 {} \; Recursively set DIRECTORY permissions. find . -type d -exec chmod 755 {} \; *Note, obviously you can change the chmod number to whatever you want, 777, 600, [...]]]></description>
			<content:encoded><![CDATA[<p>Move to the directory you want to start chmodding files in and run the following:</p>
<p>Recursively set <strong>FILE</strong> permissions.</p>
<pre class='brush: bash;'>
find . -type f -exec chmod 644 {} \;
</pre>
<p>Recursively set <strong>DIRECTORY</strong> permissions.</p>
<pre class='brush: bash;'>
find . -type d -exec chmod 755 {} \;
</pre>
<p>*Note, obviously you can change the chmod number to whatever you want, 777, 600, etc.</p>
<div class="thanks_button_div" 
                  style="float: left; margin-right: 10px;"><div id="thanksButtonDiv_1053_2" style="background-image:url(http://sudobash.net/wp-content/plugins/thanks-you-counter-button/images/thanks_large_black.png); background-repeat:no-repeat; float: left; display: inline;"
                onmouseover="javascript:thankYouChangeButtonImage('thanksButtonDiv_1053_2', true);" 
                onmouseout="javascript:thankYouChangeButtonImage('thanksButtonDiv_1053_2', false);"
                onclick="javascript:thankYouChangeButtonImage('thanksButtonDiv_1053_2', false);" >
                <input type="button" onclick="thankYouButtonClick(1053, 'You left &ldquo;Thanks&rdquo; already for this post')" value="Thanks! 2"
                  class="thanks_button thanks_large thanks_black"
                  style="  font-family: Verdana, Arial, Sans-Serif; font-size: 14px; font-weight: normal;; color:#ffffff;"
                  id="thanksButton_1053_2" title="Click to left &ldquo;Thanks&rdquo; for this post"/>
             </div><div id="ajax_loader_1053_2" style="display:inline;visibility: hidden;"><img alt="ajax loader" src="http://sudobash.net/wp-content/plugins/thanks-you-counter-button/images/ajax-loader.gif" /></div></div>]]></content:encoded>
			<wfw:commentRss>http://sudobash.net/bash-recursively-set-filedirectory-permissions/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Web Dev &gt; Select first n words of a sentence</title>
		<link>http://sudobash.net/web-dev-select-first-n-words-of-a-sentence/</link>
		<comments>http://sudobash.net/web-dev-select-first-n-words-of-a-sentence/#comments</comments>
		<pubDate>Mon, 16 Jan 2012 19:25:47 +0000</pubDate>
		<dc:creator>Scott Rowley</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[array_slice]]></category>
		<category><![CDATA[customize]]></category>
		<category><![CDATA[echo]]></category>
		<category><![CDATA[explode]]></category>
		<category><![CDATA[implode]]></category>
		<category><![CDATA[n]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[post]]></category>
		<category><![CDATA[read more]]></category>
		<category><![CDATA[sentence]]></category>
		<category><![CDATA[teaser]]></category>

		<guid isPermaLink="false">http://sudobash.net/?p=1048</guid>
		<description><![CDATA[Useful for giving a teaser of a post and then including &#8230; on the end followed by &#8220;Read More&#8221;. $sentence = "This is my sentence, there are many like it but this one is mine. What do you think of it?"; $n = 10; // Customize to however many words you want to actually show [...]]]></description>
			<content:encoded><![CDATA[<p>Useful for giving a teaser of a post and then including &#8230; on the end followed by &#8220;Read More&#8221;.</p>
<pre class="brush: php;">
$sentence = "This is my sentence, there are many like it but this one is mine. What do you think of it?";
$n = 10; // Customize to however many words you want to actually show
$teaser = implode(' ', array_slice(explode(' ', $sentence), 0, $n));

echo $teaser."...<a href='#'>READ MORE</a>
</pre>
<p>Which should result in:<br />
This is my sentence, there are many like it but&#8230;READ MORE</p>
<div class="thanks_button_div" 
                  style="float: left; margin-right: 10px;"><div id="thanksButtonDiv_1048_2" style="background-image:url(http://sudobash.net/wp-content/plugins/thanks-you-counter-button/images/thanks_large_black.png); background-repeat:no-repeat; float: left; display: inline;"
                onmouseover="javascript:thankYouChangeButtonImage('thanksButtonDiv_1048_2', true);" 
                onmouseout="javascript:thankYouChangeButtonImage('thanksButtonDiv_1048_2', false);"
                onclick="javascript:thankYouChangeButtonImage('thanksButtonDiv_1048_2', false);" >
                <input type="button" onclick="thankYouButtonClick(1048, 'You left &ldquo;Thanks&rdquo; already for this post')" value="Thanks! 0"
                  class="thanks_button thanks_large thanks_black"
                  style="  font-family: Verdana, Arial, Sans-Serif; font-size: 14px; font-weight: normal;; color:#ffffff;"
                  id="thanksButton_1048_2" title="Click to left &ldquo;Thanks&rdquo; for this post"/>
             </div><div id="ajax_loader_1048_2" style="display:inline;visibility: hidden;"><img alt="ajax loader" src="http://sudobash.net/wp-content/plugins/thanks-you-counter-button/images/ajax-loader.gif" /></div></div>]]></content:encoded>
			<wfw:commentRss>http://sudobash.net/web-dev-select-first-n-words-of-a-sentence/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web Dev &gt; Keep your copyright date current automatically</title>
		<link>http://sudobash.net/web-dev-keep-your-copyright-date-current-automatically/</link>
		<comments>http://sudobash.net/web-dev-keep-your-copyright-date-current-automatically/#comments</comments>
		<pubDate>Thu, 12 Jan 2012 20:46:11 +0000</pubDate>
		<dc:creator>Scott Rowley</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[automagically]]></category>
		<category><![CDATA[automatic]]></category>
		<category><![CDATA[automatically]]></category>
		<category><![CDATA[copy]]></category>
		<category><![CDATA[copyright]]></category>
		<category><![CDATA[current]]></category>
		<category><![CDATA[date]]></category>
		<category><![CDATA[echo]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[year]]></category>

		<guid isPermaLink="false">http://sudobash.net/?p=1033</guid>
		<description><![CDATA[Here&#8217;s a quick little tip I&#8217;ve been using recently with the new year having rolled around. I&#8217;ve started replacing all of my &#169; 2011 code with the following. This will always return the date of the current year. That way you don&#8217;t have to remember to update it all over the place every time we [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a quick little tip I&#8217;ve been using recently with the new year having rolled around. I&#8217;ve started replacing all of my &copy; 2011 code with the following.  This will always return the date of the current year.  That way you don&#8217;t have to remember to update it all over the place every time we &#8220;celebrate&#8221; a new year.</p>
<pre class='brush: php'>
&lt;?php echo date('Y'); ?&gt;
</pre>
<p>So now I don&#8217;t ever have to update this post and the current year should always be reflected here: 2012</p>
<div class="thanks_button_div" 
                  style="float: left; margin-right: 10px;"><div id="thanksButtonDiv_1033_2" style="background-image:url(http://sudobash.net/wp-content/plugins/thanks-you-counter-button/images/thanks_large_black.png); background-repeat:no-repeat; float: left; display: inline;"
                onmouseover="javascript:thankYouChangeButtonImage('thanksButtonDiv_1033_2', true);" 
                onmouseout="javascript:thankYouChangeButtonImage('thanksButtonDiv_1033_2', false);"
                onclick="javascript:thankYouChangeButtonImage('thanksButtonDiv_1033_2', false);" >
                <input type="button" onclick="thankYouButtonClick(1033, 'You left &ldquo;Thanks&rdquo; already for this post')" value="Thanks! 1"
                  class="thanks_button thanks_large thanks_black"
                  style="  font-family: Verdana, Arial, Sans-Serif; font-size: 14px; font-weight: normal;; color:#ffffff;"
                  id="thanksButton_1033_2" title="Click to left &ldquo;Thanks&rdquo; for this post"/>
             </div><div id="ajax_loader_1033_2" style="display:inline;visibility: hidden;"><img alt="ajax loader" src="http://sudobash.net/wp-content/plugins/thanks-you-counter-button/images/ajax-loader.gif" /></div></div>]]></content:encoded>
			<wfw:commentRss>http://sudobash.net/web-dev-keep-your-copyright-date-current-automatically/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web Dev &gt; Populate PHP/HTML table from MySQL database</title>
		<link>http://sudobash.net/web-dev-populate-phphtml-table-from-mysql-database/</link>
		<comments>http://sudobash.net/web-dev-populate-phphtml-table-from-mysql-database/#comments</comments>
		<pubDate>Thu, 12 Jan 2012 03:56:58 +0000</pubDate>
		<dc:creator>Scott Rowley</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[connect]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[limit]]></category>
		<category><![CDATA[loop]]></category>
		<category><![CDATA[nest]]></category>
		<category><![CDATA[nested]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[query]]></category>
		<category><![CDATA[result]]></category>
		<category><![CDATA[select]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[where]]></category>
		<category><![CDATA[while]]></category>

		<guid isPermaLink="false">http://sudobash.net/?p=997</guid>
		<description><![CDATA[Hey again all, for this post I&#8217;ll be covering how to populate a PHP/HTML table by way of looping through a table in mysql. I&#8217;ll be using the sample database provided by http://www.mysqltutorial.org/mysql-sample-database.aspx which has to do with models (cars, planes, ships, etc). Everyone has differing levels of knowledge so I&#8217;ll be including some basics [...]]]></description>
			<content:encoded><![CDATA[<p>Hey again all, for this post I&#8217;ll be covering how to populate a PHP/HTML table by way of looping through a table in mysql.  I&#8217;ll be using the sample database provided by <a href="http://www.mysqltutorial.org/mysql-sample-database.aspx" title="MySQL Sample Database" target="_blank">http://www.mysqltutorial.org/mysql-sample-database.aspx</a> which has to do with models (cars, planes, ships, etc).  Everyone has differing levels of knowledge so I&#8217;ll be including some basics as well such as connecting to the mysql database (and closing it later on). </p>
<p>The table we&#8217;ll be using in the database is &#8216;products&#8217;.  It has the following columns:</p>
<pre>
productCode        - A unique inventory number
productName        - Name of the product
productLine        - Basic descriptor, 'Motorcycles', 'Classic Cars', etc
productScale       - This models scale size
productVendor      - Company that built the model
productDescription - Detailed description of product
quantityInStock    - Current number of quantity in stock
buyPrice           - Listed price on the "website"
MSRP               - Manufacturers Suggested Retail Price
</pre>
<p>If I know I&#8217;m going to be using my mysql database in multiple files I&#8217;ll always throw the connection in something like a &#8216;dbconnect.php&#8217; file.  Here&#8217;s an example:</p>
<pre class='brush: php;'>
&lt;?php
  mysql_connect("localhost", "MYSQL_USERNAME", "MYSQL_PASSWORD") or die(mysql_error());
  mysql_select_db("MYSQL_DATABASE") or die(mysql_error());
?&gt;
</pre>
<p>Now you can include this in every file, or better yet in your header file which will get included everywhere else.  So for example in your header.php file you could throw in:</p>
<pre class='brush: php;'>
&lt;?php
  require_once('dbconnect.php');
?&gt;
</pre>
<p>Alright, so now you&#8217;ve got your connection to your database and the appropriate database selected. We&#8217;ll skip over the other content that you want to eventually add and say (for this example) that we want to list all of our models.  We&#8217;ll look at doing this a few different ways, first off we&#8217;ll go simple and just request everything from the database and then we&#8217;ll tell php how to spit that all out to us.<br />
<span id="more-997"></span><br />
So now in our file we&#8217;ll want to first build the sql command, then tell it to run the command, and finally we&#8217;ll use a while loop to run through each result.</p>
<p>This can be written a few different ways but the following is typically how I do it:</p>
<pre class='brush: php;'>
&lt;?php
  $sql = "SELECT * FROM products";
  $result = mysql_query($sql)or die(mysql_error());
&gt;
</pre>
<p>Ok, so now we&#8217;ve specified the query to run by setting the variable $sql, and followed that by running our query and populating $result with it. So now php has all the information and its stored in the $result array.  What now? Now we want to build our output using php and html.  Here we&#8217;ll build on what we have.</p>
<pre class='brush: php;'>
&lt;?php

  // For the purpose of saving space on my post I'm going to limit the amount of results to 4, see "LIMIT 4" below.
  $sql = "SELECT * FROM products LIMIT 4";
  $result = mysql_query($sql)or die(mysql_error());

  // Now let's start building our table, I'll go line by line just like HTML so it's easier to read.
  // I don't think we need every one of the details about each model so I'm going to just include what
  // I think my customer needs to know on a product overview page.  This will just list the name, description,
  // quantity in stock, scale, and price of each item.  We need to put the table opening tag and first row
  // outside of the while loop first otherwise every time we process a row we'll get a new table and tr.

  echo "&lt;table&gt;";
  echo "&lt;tr&gt;&lt;th&gt;Name&lt;/th&gt;&lt;th&gt;Description&lt;/th&gt;&lt;th&gt;Model Scale&lt;/th&gt;&lt;th&gt;# In Stock&lt;/th&gt;&lt;th&gt;Price&lt;/th&gt;&lt;/tr&gt;";

  while($row = mysql_fetch_array($result)){
  // Before we close out of PHP, lets define all of our variables so they are easier to remember and work with,
  // you can skip this though if you just want to directly reference each row.

  $name     = $row['productName'];
  $scale    = $row['productScale'];
  $desc     = $row['productDescription'];
  $quantity = $row['quantityInStock'];
  $price    = $row['buyPrice'];

// Now for each looped row

echo "&lt;tr&gt;&lt;td style='width: 200px;'&gt;".$name."&lt;/td&gt;&lt;td style='width: 600px;'&gt;".$desc."&lt;/td&gt;&lt;td&gt;".$scale."&lt;/td&gt;&lt;td&gt;".$quantity."&lt;/td&gt;&lt;td&gt;".$price."&lt;/td&gt;&lt;/tr&gt;";

} // End our while loop
echo "&lt;/table&gt;
</pre>
<p>We should now have something like the following if we did everything correctly:<br />
<iframe src='/db_example_models.php' width='100%' height='210px' frameborder=0></iframe></p>
<p>Now you would be free to go back and change the style and such as you like, maybe give each td a little room to breath by adding some cellpadding or cellspacing or whatever you like.  You can also go back and change your $sql to be more specific.  Say for example you only wanted to list products that had a scale of 1:12.  You could change your $sql to the following:</p>
<pre class='brush: php;'>
$sql = "SELECT * FROM products WHERE productScale='1:12'";
</pre>
<p>You would then see:<br />
<iframe src='/db_example_models_scale.php' width='100%' height='250px' frameborder=0></iframe></p>
<p>Once you&#8217;ve mastered doing while loop you could add another one above it.  For example what you could do would be to get the result of all products, while loop through that, and then while you are in that while loop you could use another while loop inside of it to iterate through each unique scale.</p>
<p>This will be a large example so I&#8217;ll just include a link to it so you can see it all in one place.<br />
<a href="http://sudobash.net/db_example_models_nested.php" title="PHP MySQL Nested While Loop" target="_blank">Nested Whiles</a></p>
<p>The code for that is here:</p>
<pre class='brush: php;'>
&lt;style type='text/css'&gt;
 th { text-align: left; }
 td { padding: 5px; border-bottom: 1px solid black; border-collapse: collapse; border-spacing: 0px; }
 table { border: 2px solid black; }
&lt;/style&gt;
&lt;?php
  mysql_connect("localhost", "MYSQL_USERNAME", "MYSQL_PASSWORD") or die(mysql_error());
  mysql_select_db("MYSQL_DATABASE") or die(mysql_error());

  $sql = "SELECT DISTINCT(productScale) FROM products";
  $result = mysql_query($sql)or die(mysql_error());

  while($info = mysql_fetch_array($result)){

  $scale = $info['productScale'];

  $sql_scale = "SELECT * FROM products WHERE productScale='".$scale."'";
  $result_scale = mysql_query($sql_scale)or die(mysql_error());

  echo "&lt;div style='width: 100%; text-align: center;'&gt;";
  echo "&lt;h1&gt;".$scale." Models&lt;/h1&gt;";
  echo "&lt;table style='margin: auto auto;'&gt;";
  echo "&lt;tr&gt;&lt;th&gt;Name&lt;/th&gt;&lt;th&gt;Description&lt;/th&gt;&lt;th&gt;Model Scale&lt;/th&gt;&lt;th&gt;# In Stock&lt;/th&gt;&lt;th&gt;Price&lt;/th&gt;&lt;/tr&gt;";

  while($row = mysql_fetch_array($result_scale)){

   $name     = $row['productName'];
   $scale    = $row['productScale'];
   $desc     = $row['productDescription'];
   $quantity = $row['quantityInStock'];
   $price    = $row['buyPrice'];

   // Now for each looped row

   echo "&lt;tr&gt;&lt;td style='width: 200px;'&gt;".$name."&lt;/td&gt;&lt;td style='width: 600px;'&gt;".$desc."&lt;/td&gt;&lt;td style='width: 100px;'&gt;".$scale."&lt;/td&gt;&lt;td style='width: 100px;'&gt;".$quantity."&lt;/td&gt;&lt;td style='width: 100px;'&gt;".$price."&lt;/td&gt;&lt;/tr&gt;";

  } // End our scale while loop
 echo "&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;";
} // End our master loop
</pre>
<p>Oh, and don&#8217;t forget to close your mysql connection in your footer or wherever you finish up using it.</p>
<pre class='brush: php;'>
  mysql_close();
</pre>
<div class="thanks_button_div" 
                  style="float: left; margin-right: 10px;"><div id="thanksButtonDiv_997_2" style="background-image:url(http://sudobash.net/wp-content/plugins/thanks-you-counter-button/images/thanks_large_black.png); background-repeat:no-repeat; float: left; display: inline;"
                onmouseover="javascript:thankYouChangeButtonImage('thanksButtonDiv_997_2', true);" 
                onmouseout="javascript:thankYouChangeButtonImage('thanksButtonDiv_997_2', false);"
                onclick="javascript:thankYouChangeButtonImage('thanksButtonDiv_997_2', false);" >
                <input type="button" onclick="thankYouButtonClick(997, 'You left &ldquo;Thanks&rdquo; already for this post')" value="Thanks! 4"
                  class="thanks_button thanks_large thanks_black"
                  style="  font-family: Verdana, Arial, Sans-Serif; font-size: 14px; font-weight: normal;; color:#ffffff;"
                  id="thanksButton_997_2" title="Click to left &ldquo;Thanks&rdquo; for this post"/>
             </div><div id="ajax_loader_997_2" style="display:inline;visibility: hidden;"><img alt="ajax loader" src="http://sudobash.net/wp-content/plugins/thanks-you-counter-button/images/ajax-loader.gif" /></div></div>]]></content:encoded>
			<wfw:commentRss>http://sudobash.net/web-dev-populate-phphtml-table-from-mysql-database/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

