<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
    <channel>
        <title>ColorPlex Studios - Houston Web Design Tech Articles</title>
        <description>Providing tech articles for the web development community.</description>
        <link>http://www.colorplexstudios.com</link>
        <docs>http://www.colorplexstudios.com</docs>
        <language>en-us</language>
    <generator>FeedForAll-scripts (sql2rss.php), http://www.FeedForAll.com/, Copyright 2006-2007, NotePage, Inc.</generator>
<lastBuildDate>Fri, 04 Jul 2008 10:51:44 -0700</lastBuildDate>
<pubDate>Fri, 04 Jul 2008 10:51:44 -0700</pubDate>
<item>
	<title>USPS PHP Rate Calculator</title>
	<link>http://www.colorplexstudios.com/view_article.php?article_id=9</link>
	<description>&lt;p class="article"&gt;I have reworked a popular USPS PHP Rate Calculation script written by &lt;a href="http://www.marksanborn.net" target="_blank"&gt;Mark Sanborn&lt;/a&gt; to include a few more options in the shipping calculation and also fixed a couple bugs when the user selects something other than PRIORITY.  All credit is given to Mark, and if you find this script useful please consider making a donation by clicking &lt;a href="http://www.marksanborn.net/donate" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p class="article"&gt;Please note that you will need to sign up for an account at &lt;a href="http://www.usps.com" target="_blank"&gt;USPS.com&lt;/a&gt; and have the account activated by sending an email to &lt;a href="mailto:icustomercare@usps.com"&gt;icustomercare@usps.com&lt;/a&gt;.  The test accounts just do not work for some reason.&lt;/p&gt;

&lt;h3&gt;The Script&lt;/h3&gt;
&lt;p&gt;&lt;a href="Downloads/USPS_Rate.zip"&gt;Click here to download&lt;/a&gt;&lt;/p&gt;

&lt;p class="article"&gt;Now, to check the price of a given option, simply pass in the pounds, ounces, service type, and destination zip code to this function to be returned a dollar amount.  That's it!&lt;/p&gt;
&lt;p class="article"&gt;Please note the comments in the script.  You'll notice that First Class shipments cannot weigh more than 13 ounces, and the maximum weight is 70 pounds.  Please also notice that if you choose First Class, you must pick a FirstClassMailType.  The options there are PARCEL, LETTER, or FLAT.&lt;/p&gt;</description>
	<pubDate>Wed, 31 Dec 1969 16:00:00 -0800</pubDate>
</item>
<item>
	<title>MySQL Find and Replace</title>
	<link>http://www.colorplexstudios.com/view_article.php?article_id=8</link>
	<description>&lt;p&gt;To do a simple 'find and replace' in MySQL, use the following command :&lt;/p&gt;

&lt;pre name="code" class="sql"&gt;
update table set field replace(field],'string_to_find','string_to_replace');
&lt;/pre&gt;</description>
	<pubDate>Sun, 22 Jun 2008 09:24:00 -0700</pubDate>
</item>
<item>
	<title>Selecting Top Rows in MySQL</title>
	<link>http://www.colorplexstudios.com/view_article.php?article_id=7</link>
	<description>&lt;p&gt;Selecting the top number of rows that you specify is actually a bit harder on MySQL than it is on MSSQL.  To select the top 10 rows in one of your tables you have to use the following query style :&lt;/p&gt;
&lt;pre name="code" class="sql"&gt;SELECT * FROM {table} ORDER BY {row} asc LIMIT 10&lt;/pre&gt;
&lt;p&gt;This will select the top 10 rows from your table. If you would like to select the bottom 10 rows, simply replace asc with desc.&lt;/p&gt;
&lt;p&gt;And of course, if you want more or less than 10, you can replace that number as well.&lt;/p&gt;</description>
	<pubDate>Sat, 10 Nov 2007 09:24:00 -0800</pubDate>
</item>
<item>
	<title>Variables in Variables PHP Tutorial</title>
	<link>http://www.colorplexstudios.com/view_article.php?article_id=6</link>
	<description>&lt;p&gt;If you're ever in need to create dynamic PHP variables names, you're going to need to use what is called variable reflection. This opens many possibilities with PHP, and can be used many ways. To explain, in simple terms : &lt;/p&gt;
&lt;p&gt;# The first variable is a standard variable assignment.&lt;br /&gt;
$variable = &amp;quot;Color&amp;quot;;&lt;/p&gt;
&lt;p&gt;# The second variable is defined by reflecting the first variable.&lt;br /&gt;
  $$variable = &amp;quot;Green&amp;quot;;&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;$Color == &amp;quot;Green&amp;quot;;&lt;/p&gt;</description>
	<pubDate>Tue, 06 Nov 2007 08:51:00 -0800</pubDate>
</item>
<item>
	<title>U.S. States MySQL Table</title>
	<link>http://www.colorplexstudios.com/view_article.php?article_id=5</link>
	<description>&lt;p&gt;When designing web applications for yourself or your clients, it's always good to be consistent throughout your entire site.  As a helpful time saver,  I have included a SQL file that will create a table in your MySQL database with all 50 US states.  Now, when you need to create your U.S. state dropdowns, you can simply fetch and print this array with the appropriate &amp;lt;option&amp;gt; tags around it.&lt;/p&gt;
&lt;p&gt;&lt;a href="Downloads/US_States.zip"&gt;Click here to download our 50 US States MySQL table.&lt;/a&gt; The table includes both state abbreviations as well as the full state name.&lt;/p&gt;
&lt;p&gt;If you find this article or the SQL file helpful please leave us a comment, we love to hear from you!&lt;/p&gt;</description>
	<pubDate>Mon, 05 Nov 2007 17:03:00 -0800</pubDate>
</item>
<item>
	<title>Class vs ID</title>
	<link>http://www.colorplexstudios.com/view_article.php?article_id=4</link>
	<description>&lt;p&gt;I often get questioned as to what the difference is between class tags vs ID tags in CSS.  It's actually quite simple, and many people over think it.  ID tags can only be used *once* on a web page, whereas class tags can be used multiple times on a webpage.  ID tags are typically used on DIV tags that layout a webpage, as they'll only be required once.  Class tags are used on things such as text, table parameters, etc.&lt;/p&gt;

&lt;p&gt;To setup a class tag, you would do the following on your CSS stylesheet.&lt;/p&gt;

&lt;pre name="code" class="css"&gt;
.classname {
parameter:value;
}
&lt;/pre&gt;
&lt;p&gt;To setup an ID tag, you would do the following in your CSS stylesheet.&lt;/p&gt;
&lt;pre name="code" class="css"&gt;
#idname {
parameter:value;
}&lt;/pre&gt;
&lt;p&gt;Notice the difference is the pound sign (#) on ID's, and the period on classes.&lt;/p&gt;
&lt;p&gt;Now, on your webpage, when you want an asset on your page to have an ID tag associated with it, you would do something like the following : &amp;lt;div id="id_name"&amp;gt;Test!&amp;lt;/div&amp;gt;.  Just like ID's, when you want to specify a class you would write the following : &amp;lt;div class=&amp;quot;class_name&amp;quot;&amp;gt;Test!&amp;lt;/div&amp;gt;.&lt;/p&gt;</description>
	<pubDate>Sat, 03 Nov 2007 13:48:00 -0700</pubDate>
</item>
<item>
	<title>DIV based Web Design Tutorial</title>
	<link>http://www.colorplexstudios.com/view_article.php?article_id=3</link>
	<description>&lt;p&gt;These days, more and more design studios are switching over to the recommended web design stratetgy of using DIV tags over tables.  CSS has many advantages over traditional tables for more complex layouts, but in this tutorial we'll be discussing the basics of DIV based web design.  We'll simply lay out a common web design layout and let you tinker with it from there.&lt;/p&gt;

&lt;p&gt;To start with, I'll display all the CSS code we're going to use to layout the page, followed by the HTML that will actually display it.&lt;/p&gt;
&lt;h3&gt;The CSS Code&lt;/h3&gt;
&lt;pre name="code" class="css"&gt;
body {
margin: 0px;
padding: 0px;
}
#header {
background: #438a48;
width: 100%;
}
.leftcolumn {
background: #2675a8;
float: left;
width: 25%;
height: 700px;
}
#content {
background: #000;
float: left;
width: 75%;
height: 700px;
}
#footer {
background: #df781c;
clear: both;
width: 100%;
}
&lt;/pre&gt;

&lt;h3&gt;The HTML&lt;/h3&gt;
&lt;pre name="code" class="css"&gt;
&amp;lt;div id="header"&gt;Header&lt;/div&gt;
&lt;div id="leftcolumn"&gt;Left Column&lt;/div&gt;
&lt;div id="content"&gt;Content&lt;/div&gt;
&lt;div id="footer"&gt;Footer&lt;/div&gt;
&lt;/pre&gt;
&lt;h3&gt;Image DIV description&lt;/h3&gt;
&lt;img src="http://www.colorplexstudios.com/article_images/3_div_box.jpg" alt="DIV Web Design Tutorial" /&gt;&lt;br /&gt;
&lt;h3&gt;The Tutorial&lt;/h3&gt;
&lt;p&gt;Let me explain the tags involved.  First, we set the body of your document to have zero margins on all four sides, as well as zero padding on all four sides.  This will allow your data to be flush against the edge of the page on your browser.  Next, we create your header region, setting it's width to 100% of your browsers width, and giving it a background of the hex color #438a48.  We are not going to give the header section a static height value, as we're going to let the content within be the judge of that.  Next, we'll setup our left column.  We start by giving it a background color, specifying a width of 25% of the browsers width, and a static height of 700 pixels.  We're also going to "float" our div to the left.  Floating allows more than one DIV tag to be on a line.  This is going to come in handy for our content section.  Now, see the content section.  Everything should look familiar.  We're going to float the content section to the left again, pushing it flush against the left column.  The two width percentages of the left column and the content section should equal 100%.  Our last section is the footer with the same type of tags as the rest, except the "clear" tag.  Clearing a DIV tag has 4 options.  Left, Right, Both, and None.  When you specify a clear on a DIV it tells the browser that it cannot put another div on the left or right side of that div tag.  This is a very useful specification.  I encourage you to play with this CSS tag as specified by the W3C page.&lt;/p&gt;
&lt;p&gt;After you have setup the CSS styles of your DIV's, the last step is to create your DIV's in your HTML with their respective ID tags.  Your browser will do the rest!&lt;/p&gt;</description>
	<pubDate>Wed, 31 Oct 2007 14:21:00 -0700</pubDate>
</item>
<item>
	<title>MySQL datetime PHP Formatting</title>
	<link>http://www.colorplexstudios.com/view_article.php?article_id=2</link>
	<description>&lt;p class="article"&gt;You have a MySQL datetime column in your database and you want to display it in your PHP page.  With this function, this becomes easily attainable.  All that is required to pass in to the function is datetime variable you pulled down from the database and to assign a variable to the function.  See this easy to follow example below.&lt;/p&gt;

&lt;h3&gt;The Code:&lt;/h3&gt;
&lt;pre name="code" class="php"&gt;
&amp;#60;?php
function ConvertDate($sql_date) {
$date=strtotime($sql_date);
$final_date=date("F j, Y, g:i a", $date);
return $final_date;
}
?&amp;#62;
&lt;/pre&gt;

&lt;p class="article"&gt;Let me explain the function.  First, I start off by declaring the function, naming it "ConvertDate".  Also on this line I am "passing in" a variable, $sql_date.  The variable $sql_date is the datetime cell from your MySQL database. On the second line, I use the strtotime PHP function to convert the datetime variable to a format PHP's date function can handle.  Next line we specify how we want the date to read.  In this example, the output would display something like "October 30, 2007, 9:34 am".  If you want it to display something different, see &lt;a href="http://www.php.net/date"&gt;PHP's date function&lt;/a&gt; page for formatting options.  On the last line, I "return" $final_date, which is allows your function to store a variable for your convenience later.&lt;/p&gt;
&lt;p class="article"&gt;After your function is setup, all you need to do is call your function on the page you want to display your datetime value on.&lt;/p&gt;
&lt;p class="article"&gt;$date=ConvertDate($sql_date);&lt;br /&gt;
echo $date;&lt;/p&gt;
&lt;p class="article"&gt;There may be other ways to accomplish this, but I've always used this method and it has always worked great for me.  If you have any troubles or comments please feel free to leave them in the comments section below.&lt;/p&gt;</description>
	<pubDate>Sun, 28 Oct 2007 10:57:00 -0700</pubDate>
</item>
<item>
	<title>Leopard iChat - "You have attempted to login too often in a short period of time.  Wait a few minutes before trying to login again."error message.</title>
	<link>http://www.colorplexstudios.com/view_article.php?article_id=1</link>
	<description>&lt;img src="article_images/1_ichat.jpg" alt="iChat Leopard troubleshooting" /&gt;&lt;br /&gt;
&lt;p class="article"&gt;Like millions of people out there, I upgraded my Mac OS X 10.4 computer to Apple's latest OS this past weekend, 10.5 Leopard.  So far, I am very pleased with the results.  The only trouble I have had is connecting to my AIM service using iChat.&lt;/p&gt;
&lt;p class="article"&gt;If you're receiving this error message, try the following troubleshooting steps to correct the error.  This is a solution to one instance of this error.  If it does not work, don't give up!&lt;/p&gt;
&lt;ul class="articles"&gt;
	&lt;li&gt;Open iChat&lt;/li&gt;
    &lt;li&gt;Click on iChat &gt; Preferences&lt;/li&gt;
    &lt;li&gt;Find your AIM account you're having trouble with in the left column&lt;/li&gt;
    &lt;li&gt;Click on Server Settings&lt;/li&gt;
    &lt;li&gt;Change your server port from 5190 to 443&lt;/li&gt;
    &lt;li&gt;Restart iChat&lt;/li&gt;
&lt;/ul&gt;</description>
	<pubDate>Sat, 27 Oct 2007 15:34:00 -0700</pubDate>
</item>
</channel>
</rss>

