<?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>BLUEice studios &#187; Featured Articles</title>
	<atom:link href="http://www.blueicestudios.com/category/featured-articles/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.blueicestudios.com</link>
	<description>I make stuff for you :)</description>
	<lastBuildDate>Wed, 20 Jul 2011 09:07:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Nivo Slider Auto Thumbs with TimThumb</title>
		<link>http://www.blueicestudios.com/nivo-slider-auto-thumbs-with-timthumb/</link>
		<comments>http://www.blueicestudios.com/nivo-slider-auto-thumbs-with-timthumb/#comments</comments>
		<pubDate>Fri, 24 Dec 2010 22:12:10 +0000</pubDate>
		<dc:creator>Rob</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[Featured Articles]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[nivoslider]]></category>
		<category><![CDATA[timthumb]]></category>

		<guid isPermaLink="false">http://www.blueicestudios.com/?p=362</guid>
		<description><![CDATA[Just a quick and painless way to add thumbnail support to the Nivo Slider with TimThumb. Get yourself the TimThumb source and put it in the root of your site. Create a folder in the root of your site named &#8220;cache&#8221; and set the permissions to 777. Now open your nivo slider js file. Im [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quick and painless way to add thumbnail support to the <a href="http://nivo.dev7studios.com/" target="_blank">Nivo Slider</a> with <a href="http://timthumb.googlecode.com/svn/trunk/timthumb.php" target="_blank">TimThumb</a>.</p>
<p><a href="http://www.blueicestudios.com/wp-content/uploads/2010/12/nivo_thumb.JPG"><img class="aligncenter size-medium wp-image-363" title="nivo_thumb" src="http://www.blueicestudios.com/wp-content/uploads/2010/12/nivo_thumb-300x83.jpg" alt="nivo_thumb" width="300" height="83" /></a><br />
Get yourself the <a href="http://timthumb.googlecode.com/svn/trunk/timthumb.php" target="_blank">TimThumb</a> source and put it in the root of your site.</p>
<p>Create a folder in the root of your site named &#8220;<strong>cache</strong>&#8221; and set the permissions to 777.</p>
<p>Now open your nivo slider js file. Im using jquery.nivo.slider.pack.js, search for the first nivo-control.<br />
<code><br />
&lt;a rel="'+k+'"&gt;&lt;img src="'+f.attr("rel")+'" alt="" /&gt;&lt;/a&gt;<br />
</code><br />
Now replace that with<br />
<code><br />
<a class="nivo-control" rel="'+k+'"><img src="'+f.attr(" alt="" /></a>&lt;a rel="'+k+'"&gt;&lt;img src="timthumb.php?src='+f.attr("src")+'&amp;h=19&amp;w=35" alt="" /&gt;&lt;/a&gt;<br />
</code><br />
The changes made are the timthumb.php addition to the image src and the attr change to src.<br />
<code><br />
timthumb.php?src='+f.attr("src")+'&amp;h=19&amp;w=35<br />
</code><br />
adjust the h= and w= to your liking.</p>
<p>Save the file and your good to go, no need to make thumbnails or anything else to the img tag in your nivo slider.</p>
<p>If you would like installation help just contact me via skype: blueicestudios</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blueicestudios.com/nivo-slider-auto-thumbs-with-timthumb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Chained Select Box Generator</title>
		<link>http://www.blueicestudios.com/chained-select-box-generator/</link>
		<comments>http://www.blueicestudios.com/chained-select-box-generator/#comments</comments>
		<pubDate>Fri, 10 Dec 2010 07:21:35 +0000</pubDate>
		<dc:creator>Rob</dc:creator>
				<category><![CDATA[Featured Articles]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[box]]></category>
		<category><![CDATA[chained]]></category>
		<category><![CDATA[generator]]></category>
		<category><![CDATA[select]]></category>

		<guid isPermaLink="false">http://www.blueicestudios.com/?p=292</guid>
		<description><![CDATA[Well everyone, I&#8217;m almost done with the generator!! Watch this short clip to see it in action. Features: Generate on the fly 3 tier chained selects. View the chain after its created. Edit an existing chain as easy as you made it. Delete chains. Export chain files. Export chain CSV database file. Build unlimited chains [...]]]></description>
			<content:encoded><![CDATA[<p><span style="color: #ff0000;"><strong>Well everyone, I&#8217;m almost done with the generator!! </strong></span></p>
<p><span style="color: #ff0000;"><strong>Watch this short clip to see it in action.</strong></span></p>
<p><span style="color: #ff0000;"><strong><span id="more-292"></span><br />
</strong></span></p>
<p><strong>Features:</strong></p>
<ol>
<li><strong>Generate on the fly 3 tier chained selects.</strong></li>
<li><strong>View the chain after its created.<br />
</strong></li>
<li><strong>Edit an existing chain as easy as you made it.</strong></li>
<li><strong>Delete chains.</strong></li>
<li><strong>Export chain files.</strong></li>
<li><strong>Export chain CSV database file.</strong></li>
<li><strong>Build unlimited chains and unlimited options.</strong></li>
<li><strong>Upload the generator, create a database, edit 1 file and your ready to make chains!<br />
</strong></li>
</ol>
<p style="text-align: center;">
A screenshot of the current version<br /><a href="http://www.blueicestudios.com/wp-content/uploads/2010/12/Capture1.JPG"><img class="aligncenter size-full wp-image-296" title="Ver 1.2" src="http://www.blueicestudios.com/wp-content/uploads/2010/12/Capture1.JPG" alt="Capture1" width="580" height="130" /></a></p>
<p><object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/O6J79x6Lojc?fs=1&amp;hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/O6J79x6Lojc?fs=1&amp;hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object></p>
<p style="text-align: center;">If you are interested in this tool it is for sale, while I get together a payment system you can <a href="http://www.blueicestudios.com/contact-us/">contact me</a> about trying out a beta.</p>
<p><a href='http://www.pledgie.com/campaigns/14423'><img alt='Click here to lend your support to: Chained Select Generator and make a donation at www.pledgie.com !' src='http://www.pledgie.com/campaigns/14423.png?skin_name=chrome' border='0' /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.blueicestudios.com/chained-select-box-generator/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ajax Refresh</title>
		<link>http://www.blueicestudios.com/ajax-refresh/</link>
		<comments>http://www.blueicestudios.com/ajax-refresh/#comments</comments>
		<pubDate>Tue, 10 Nov 2009 05:26:00 +0000</pubDate>
		<dc:creator>Rob</dc:creator>
				<category><![CDATA[AJAX]]></category>
		<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[Featured Articles]]></category>

		<guid isPermaLink="false">http://www.blueicestudios.com/?p=173</guid>
		<description><![CDATA[Div Refreshing with Ajax. function createRequestObject() { var req; if(window.XMLHttpRequest){ // Firefox, Safari, Opera... req = new XMLHttpRequest(); } else if(window.ActiveXObject) { // Internet Explorer 5+ req = new ActiveXObject("Microsoft.XMLHTTP"); } else { // There is an error creating the object, // just as an old browser is being used. alert("Your Browser Does Not Support [...]]]></description>
			<content:encoded><![CDATA[<p>Div Refreshing with Ajax.</p>
<pre class="brush:js">function createRequestObject() {

   var req;

   if(window.XMLHttpRequest){
      // Firefox, Safari, Opera...
      req = new XMLHttpRequest();
   } else if(window.ActiveXObject) {
      // Internet Explorer 5+
      req = new ActiveXObject("Microsoft.XMLHTTP");
   } else {
      // There is an error creating the object,
      // just as an old browser is being used.
     alert("Your Browser Does Not Support This Script - Please Upgrade Your Browser ASAP");
   }

   return req;

}

// Make the XMLHttpRequest object
var http = createRequestObject();

function sendRequest(page) {

   // Open PHP script for requests
   http.open('get', page);
   http.onreadystatechange = handleResponse;
   http.send(null);

}

function handleResponse() {

   if(http.readyState == 4 &amp;&amp; http.status == 200){

      // Text returned FROM the PHP script
      var response = http.responseText;

      if(response) {
         // UPDATE ajaxTest content
         document.getElementById("div id").innerHTML = response;
      }

   }

}

function repeatloop()
{
sendRequest('page.php');
setTimeout("repeatloop()", 2000);
}

window.onload=function() {
repeatloop();
}</pre>
<p>div id is the div in which the page is loaded.<br />
edit &#8220;page.php&#8221; as the page to load.<br />
change the timeout to your liking. 2000 is 2 seconds.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blueicestudios.com/ajax-refresh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>5 Minute Flex Data Grid</title>
		<link>http://www.blueicestudios.com/5-minute-flex-data-grid/</link>
		<comments>http://www.blueicestudios.com/5-minute-flex-data-grid/#comments</comments>
		<pubDate>Wed, 01 Jul 2009 09:21:15 +0000</pubDate>
		<dc:creator>Rob</dc:creator>
				<category><![CDATA[Featured Articles]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Datagrid]]></category>

		<guid isPermaLink="false">http://www.blueicestudios.com/?p=22</guid>
		<description><![CDATA[So you want a quick solution for a data grid with inline edit, add, delete, search and sorting? I&#8217;ve got just the answer for you. &#8230;..Adobe Flex. Finished Data Grid: Demo So lets start, The data used for the grid will be pulled from a MySQL database. If you don&#8217;t have one ready, use this [...]]]></description>
			<content:encoded><![CDATA[<p>So you want a quick solution for a data grid with inline edit, add, delete, search and sorting? I&#8217;ve got just the answer for you. &#8230;..Adobe Flex.</p>
<p><span id="more-22"></span></p>
<p>Finished Data Grid: <a title="Demo" href="http://www.blueicestudios.com/datagrid/" target="_blank">Demo</a></p>
<p>So lets start, The data used for the grid will be pulled from a MySQL database.</p>
<p>If you don&#8217;t have one ready, use this to get an idea.</p>
<pre>CREATE DATABASE `flex_grid` ;

CREATE TABLE `flex_grid`.`grid_data` (
`user_id` INT( 11 ) NOT NULL AUTO_INCREMENT ,
`user_name` VARCHAR( 22 ) NOT NULL ,
`user_email` VARCHAR( 60 ) NOT NULL ,
`user_phone` VARCHAR( 20 ) NOT NULL ,
`user_mobile` VARCHAR( 20 ) NOT NULL ,
PRIMARY KEY ( `user_id` )
) ENGINE = InnoDB;

INSERT INTO `flex_grid`.`grid_data` (
`user_id` ,
`user_name` ,
`user_email` ,
`user_phone` ,
`user_mobile`
)
VALUES (
NULL , 'Joe Blow', 'joe@blow.com', '123-456-7890', '321-654-0987'
);</pre>
<p>Ok, once you get this running or if you have your own lets start.</p>
<h3>Step 1: Creating the Flex Project</h3>
<p>Open up Adobe Flex if you don&#8217;t already have it open&#8230;&#8230; Got it open? Ok good.</p>
<p>Now navigate to File &gt; New &gt; Flex Project</p>
<p><a href="http://www.blueicestudios.com/wp-content/uploads/2009/07/fig1.jpg" target="_blank"><img class="alignnone size-thumbnail wp-image-23" title="fig1" src="http://www.blueicestudios.com/wp-content/uploads/2009/07/fig1-150x150.jpg" alt="fig1" width="150" height="150" /></a></p>
<p>Next lets set up the project.</p>
<p>Create a project name and choose PHP from the dropdown list.</p>
<p><a href="http://www.blueicestudios.com/wp-content/uploads/2009/07/fig2.jpg" target="_blank"><img class="alignnone size-thumbnail wp-image-24" title="fig2" src="http://www.blueicestudios.com/wp-content/uploads/2009/07/fig2-150x150.jpg" alt="fig2" width="150" height="150" /></a></p>
<p>Hit Next,</p>
<p>Now create a folder where you want the project to be added as well as a URL to the project and click Validate Configuration.</p>
<p><a href="http://www.blueicestudios.com/wp-content/uploads/2009/07/fig3.jpg" target="_blank"><img class="alignnone size-thumbnail wp-image-25" title="fig3" src="http://www.blueicestudios.com/wp-content/uploads/2009/07/fig3-150x150.jpg" alt="fig3" width="150" height="150" /></a></p>
<p>Hit Next, the project will be created. Then simple hit Finish.</p>
<h3>Step2: Create Application From Database.</h3>
<p>You should now have a project with a blank blue canvas.</p>
<p>Navigate to Data &gt; Create Application from Database&#8230;</p>
<p><a href="http://www.blueicestudios.com/wp-content/uploads/2009/07/fig4.jpg"><img class="alignnone size-thumbnail wp-image-28" title="fig4" src="http://www.blueicestudios.com/wp-content/uploads/2009/07/fig4-150x126.jpg" alt="fig4" width="150" height="126" /></a></p>
<p>Click &#8220;New&#8221; to setup a new connection..</p>
<p><a href="http://www.blueicestudios.com/wp-content/uploads/2009/07/fig5.jpg"><img class="alignnone size-thumbnail wp-image-29" title="fig5" src="http://www.blueicestudios.com/wp-content/uploads/2009/07/fig5-150x150.jpg" alt="fig5" width="150" height="150" /></a></p>
<p>Give the connection a name and hit next&#8230;</p>
<p><a href="http://www.blueicestudios.com/wp-content/uploads/2009/07/fig6.jpg"><img class="alignnone size-thumbnail wp-image-30" title="fig6" src="http://www.blueicestudios.com/wp-content/uploads/2009/07/fig6-150x150.jpg" alt="fig6" width="150" height="150" /></a></p>
<p>The MySQL Connection info and hit next..</p>
<p><a href="http://www.blueicestudios.com/wp-content/uploads/2009/07/fig7.jpg"><img class="alignnone size-thumbnail wp-image-31" title="fig7" src="http://www.blueicestudios.com/wp-content/uploads/2009/07/fig7-150x150.jpg" alt="fig7" width="150" height="150" /></a></p>
<p>Now just hit Finish.</p>
<p>From here it will create the grid.</p>
<p>Now, navigate to File &gt; Export &gt; Release Build.</p>
<p>Pretty straight forward from here on.</p>
<p>Finished Data Grid: <a title="Demo" href="http://www.blueicestudios.com/datagrid/" target="_blank">Demo</a></p>
<p>I hope this helped you with learning a nice feature of Adobe Flex.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blueicestudios.com/5-minute-flex-data-grid/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>PHP Percentage Bar</title>
		<link>http://www.blueicestudios.com/php-percentage-bar/</link>
		<comments>http://www.blueicestudios.com/php-percentage-bar/#comments</comments>
		<pubDate>Wed, 17 Jun 2009 23:32:28 +0000</pubDate>
		<dc:creator>Rob</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Featured Articles]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[php percentage bar]]></category>

		<guid isPermaLink="false">http://www.blueicestudios.com/?p=14</guid>
		<description><![CDATA[Source Files: DOWNLOAD View working examples here: DEMO MySQL Table, used for example. CREATE TABLE IF NOT EXISTS `percent` ( `per_id` int(11) NOT NULL auto_increment, `per_num` varchar(255) NOT NULL, PRIMARY KEY (`per_id`) ) ENGINE=InnoDB; 1. Lets start with the MySQL Connection, I named this file dbcommon.php. Besure to change the username, password and database to [...]]]></description>
			<content:encoded><![CDATA[<p><img class="size-full wp-image-18 alignnone" title="percentss" src="http://www.blueicestudios.com/wp-content/uploads/2009/06/percentss.gif" alt="percentss" width="263" height="152" /></p>
<p><span id="more-14"></span></p>
<div style="font-size:12px; color:#333333;">Source Files: <a href="http://www.blueicestudios.com/percent/percent.zip">DOWNLOAD</a></div>
<div style="font-size:12px; color:#333333;">View working examples here: <a href="http://www.blueicestudios.com/percent/" target="_blank">DEMO</a></div>
<p>MySQL Table, used for example.</p>
<pre class="brush:sql">CREATE TABLE IF NOT EXISTS `percent` (
`per_id` int(11) NOT NULL auto_increment,
`per_num` varchar(255) NOT NULL,
PRIMARY KEY (`per_id`)
) ENGINE=InnoDB;</pre>
<p>1. Lets start with the MySQL Connection, I named this file <strong>dbcommon.php</strong>. Besure to change the username, password and database to your own.</p>
<pre class="brush:php">mysql_connect("localhost", "username", "password") or die(mysql_error());
mysql_select_db("databasename") or die(mysql_error());</pre>
<p>2. <strong>function.php</strong> will contains the script for the query and bar. I setup the 4 function examples as in the demo.</p>
<pre class="brush:php">function percent_full(){

  $result = mysql_query("SELECT * FROM percent")
  or die(mysql_error());

	 while($full = mysql_fetch_array( $result )) {
		echo '
<div id="bar_wrap_full">
<div class="num">'.($full['per_num']).'%</div>
<div style="text-align:center;">id:'.($full['per_id']).'</div>
</div>

';
	 } 

}

function percent_button(){

  $result = mysql_query("SELECT * FROM percent")
  or die(mysql_error());

	 while($button = mysql_fetch_array( $result )) {
		echo '
<div id="bar_wrap_button"></div>

';
	 }

}

function percent_donation_full(){

  $result = mysql_query("SELECT * FROM percent WHERE per_id=18")
  or die(mysql_error());

	 while($donation_full = mysql_fetch_array( $result )) {
		echo '
<div id="bar_wrap_donation_full">
<div class="top">
<div class="num"> $'.($donation_full['per_num']).'</div>
</div>
</div>

';
	 } 

}

function percent_donation_button(){

  $result = mysql_query("SELECT * FROM percent WHERE per_id=18")
  or die(mysql_error());

	 while($donation_button = mysql_fetch_array( $result )) {
		echo '
<div id="bar_wrap_donation_button">
<div class="top">
<div class="num"> $'.($donation_button['per_num']).'</div>
</div>
</div>

';
	 } 

}</pre>
<p>3. <strong>style.css</strong> page will control the way the bars are shown.</p>
<pre class="brush:css">@charset "utf-8";
#no-margin {
margin:0px;
}
/* Begin Percentage Bar Full */
#bar_wrap_full {
width:24px;
height:106px;
background:url(img/measure.gif) no-repeat right;
font-size:9px;
font:Arial, Helvetica, sans-serif;
color:#999;
float:left;
margin-right:20px;
}

#bar_wrap_full div.top {
width:20px;
height:3px;
background:url(img/bar_top.gif) no-repeat;
}

#bar_wrap_full div.center {
width:20px;
background:url(img/bar_cent.gif) repeat-y;
}

#bar_wrap_full div.bottom {
width:20px;
height:3px;
background:url(img/bar_bot.gif) no-repeat;
}

#bar_wrap_full div.num {
text-align:center;
}

#bar_wrap_full div.overlay {
background:url(img/lines.png) no-repeat;
width:24px;
height:106px;
}
/* End Percentage Bar Full */

/* Begin Percentage Bar Button */
#bar_wrap_button {
width:24px;
height:106px;
background: url(img/measure_buttons.gif) no-repeat right;
font-size:9px;
font:Arial, Helvetica, sans-serif;
color:#999;
float:left;
margin-right:20px;
}

#bar_wrap_button div.top {
width:20px;
height:3px;
background:url(img/bar_top.gif) no-repeat;
}

#bar_wrap_button div.center {
width:20px;
background:url(img/bar_cent.gif) repeat-y;
}

#bar_wrap_button div.bottom {
width:20px;
height:3px;
background:url(img/bar_bot.gif) no-repeat;
}

#bar_wrap_button div.num {
text-align:center;
}

#bar_wrap_button div.overlay {
background: url(img/stripes.png) bottom;
width:24px;
height:auto;
}

/* End Percentage Bar Button */

/* Begin Percentage Bar Full */
#bar_wrap_donation_full {
width:24px;
height:106px;
background:url(img/measure.gif) no-repeat right;
font-size:9px;
font:Arial, Helvetica, sans-serif;
color:#999;
float:left;
margin-right:20px;
}

#bar_wrap_donation_full div.top {
width:50px;
height:3px;
background:url(img/bar_top.gif) no-repeat left;
}

#bar_wrap_donation_full div.center {
width:20px;
background:url(img/bar_cent.gif) repeat-y;
}

#bar_wrap_donation_full div.bottom {
width:20px;
height:3px;
background:url(img/bar_bot.gif) no-repeat;
}

#bar_wrap_donation_full div.num {
text-align:center;
margin-left:20px;
line-height:0;
}

#bar_wrap_donation_full div.overlay {
background:url(img/lines.png) no-repeat;
width:24px;
height:106px;
}
/* End Percentage Bar Full */

/* Begin Percentage Bar button */
#bar_wrap_donation_button {
width:24px;
height:106px;
background:url(img/measure_buttons.gif) no-repeat right;
font-size:9px;
font:Arial, Helvetica, sans-serif;
color:#999;
float:left;
margin-right:20px;
}

#bar_wrap_donation_button div.top {
width:50px;
height:3px;
background:url(img/bar_top.gif) no-repeat left;
}

#bar_wrap_donation_button div.center {
width:20px;
background:url(img/bar_cent.gif) repeat-y;
}

#bar_wrap_donation_button div.bottom {
width:20px;
height:3px;
background:url(img/bar_bot.gif) no-repeat;
}

#bar_wrap_donation_button div.num {
text-align:center;
margin-left:20px;
line-height:0;
}

#bar_wrap_donation_button div.overlay {
background:url(img/lines.png) no-repeat;
width:24px;
height:106px;
}
/* End Percentage Bar Full */</pre>
<p>4. <strong>index.php</strong><br />
Lets add the database connection and functions.</p>
<pre class="brush:php">include('dbcommon.php');
include('function.php');</pre>
<p>in the body we will call the functions.</p>
<pre class="brush:php">percent_full();

percent_button();

percent_donation_full();

percent_donation_button();</pre>
<hr />
<div style="font-size:12px; color:#333333;">Download, contains images, css, php: <a href="http://www.blueicestudios.com/percent/percent.zip">percentage_bar.zip</a></div>
<div style="font-size:12px; color:#333333;">View a working examples here: <a href="http://www.blueicestudios.com/percent/" target="_blank">demo</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.blueicestudios.com/php-percentage-bar/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Chained Select Boxes using PHP / MySQL / AJAX / jQuery</title>
		<link>http://www.blueicestudios.com/chained-select-boxes-using-php-mysql-ajax/</link>
		<comments>http://www.blueicestudios.com/chained-select-boxes-using-php-mysql-ajax/#comments</comments>
		<pubDate>Sat, 05 Jan 0210 11:42:12 +0000</pubDate>
		<dc:creator>Rob</dc:creator>
				<category><![CDATA[AJAX]]></category>
		<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[Featured Articles]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[chained select boxes]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.blueicestudios.com/?p=123</guid>
		<description><![CDATA[UPDATE Well everyone, I&#8217;m almost done with the generator!! Watch this short clip to see it in action. If you are interested in this tool it is for sale, while I get together a payment system you can contact me about trying out a beta. DEMO 2 and 3 Dropdowns available in the download. It [...]]]></description>
			<content:encoded><![CDATA[<p><span style="color: #ff0000;"><strong>UPDATE</strong></span></p>
<p><span style="color: #ff0000;"><strong>Well everyone, I&#8217;m almost done with the generator!! </strong></span></p>
<p><span style="color: #ff0000;"><strong>Watch this short clip to see it in action.</strong></span></p>
<p><object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/_f9sJCatmDg?fs=1&amp;hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/_f9sJCatmDg?fs=1&amp;hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object><br />
</strong></span></p>
<p><span id="more-123"></span></p>
<p>If you are interested in this tool it is for sale, while I get together a payment system you can <a href="http://www.blueicestudios.com/contact-us/">contact me</a> about trying out a beta.</p>
<p><a href="http://blueicestudios.com/chained-select-boxes/" target="_blank">DEMO</a></p>
<p>2 and 3 Dropdowns available in the download.</p>
<p style="text-align: center;"><a href="http://blueicestudios.com/chained-select-boxes/" target="_blank"><img class="size-full wp-image-207 aligncenter" title="tier" src="http://www.blueicestudios.com/wp-content/uploads/0210/05/tier.jpg" alt="tier" width="425" height="85" /></a></p>
<p>It is fairly simple and consists of only 3 files. An index, database connection and a function file. So lets start.</p>
<p>Make your database table and fields. you can use mine for now.</p>
<pre class="brush:php">CREATE TABLE IF NOT EXISTS `two_drops` (
  `id` int(11) NOT NULL auto_increment,
  `tier_one` varchar(255) NOT NULL,
  `tier_two` varchar(255) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM ;

INSERT INTO `two_drops` (`id`, `tier_one`, `tier_two`) VALUES
(1, 'Colors', 'Red'),
(2, 'Colors', 'Blue'),
(3, 'Colors', 'Green'),
(4, 'Colors', 'Yellow'),
(5, 'Colors', 'Black'),
(6, 'Shapes', 'Square'),
(7, 'Shapes', 'Circle'),
(8, 'Shapes', 'Triangle'),
(9, 'Shapes', 'Rectangle'),
(10, 'Shapes', 'Oval');</pre>
<p>Make your connection to your database. <strong><em>db.php</em></strong></p>
<pre class="brush:php">mysql_connect("localhost", "username", "password") or die(mysql_error());
mysql_select_db("database") or die(mysql_error());</pre>
<p>Next we will add the jQuery, loading, results and main form in <strong><em>index.php</em></strong></p>
<p>add your includes at the top of the page.</p>
<pre class="brush:php">  //include your database connection and function files.
  include('db.php');
  include('func.php');</pre>
<p>and the rest of the page.</p>
<pre class="brush:php">//jquery framework
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js" type="text/javascript"><!--mce:0--></script></pre>
<pre class="brush:js">$(document).ready(function() {
	$('#wait_1').hide();
	$('#drop_1').change(function(){
	  $('#wait_1').show();
	  $('#result_1').hide();
      $.get("func.php", {
		func: "drop_1",
		drop_var: $('#drop_1').val()
      }, function(response){
        $('#result_1').fadeOut();
        setTimeout("finishAjax('result_1', '"+escape(response)+"')", 400);
      });
    	return false;
	});
});

function finishAjax(id, response) {
  $('#wait_1').hide();
  $('#'+id).html(unescape(response));
  $('#'+id).fadeIn();
}</pre>
<pre class="brush:php">
<form method="post">
<select id="drop_1" name="drop_1">
<option disabled="disabled" selected="selected">Select a Category</option>
</select>

    <span id="wait_1" style="display: none;">
    <img src="ajax-loader.gif" alt="Please Wait" />
    </span>
</form>
</pre>
<p>Ok, that was easy enough. Now for the functions <strong><em>func.php</em></strong></p>
<pre class="brush:php">//**************************************
//     Page load dropdown results     //
//**************************************
function getTierOne()
{
	$result = mysql_query("SELECT DISTINCT tier_one FROM two_drops")
	or die(mysql_error());

	  while($tier = mysql_fetch_array( $result )) 

		{
		   echo ''.$tier['tier_one'].'';
		}

}

//**************************************
//     First selection results     //
//**************************************
if($_GET['func'] == "drop_1" &amp;&amp; isset($_GET['func'])) {
   drop_1($_GET['drop_var']);
}

function drop_1($drop_var)
{
    include_once('db.php');
	$result = mysql_query("SELECT * FROM two_drops WHERE tier_one='$drop_var'")
	or die(mysql_error());

	echo '
<select id="tier_two" name="tier_two">
<option disabled="disabled" selected="selected" value=" ">Choose one</option>
<option value="'.$drop_2['tier_two'].'">'.$drop_2['tier_two'].'</option>
</select>

 ';
    echo '
<input name="submit" type="submit" value="Submit" />';
}</pre>
<p>And thats it. Download the files below.</p>
<p><a href="http://blueicestudios.com/chained-select-boxes/" target="_blank">DEMO</a></p>
<p><a href="http://blueicestudios.com/chained-select-boxes/chained_select.zip">DOWNLOAD</a></p>
<p>Want more helpful and free scripts? Buy me a cup of coffee to keep me goin!</p>
<p><a href='http://www.pledgie.com/campaigns/14423'><img alt='Click here to lend your support to: Chained Select Generator and make a donation at www.pledgie.com !' src='http://www.pledgie.com/campaigns/14423.png?skin_name=chrome' border='0' /></a><!--more--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.blueicestudios.com/chained-select-boxes-using-php-mysql-ajax/feed/</wfw:commentRss>
		<slash:comments>137</slash:comments>
		</item>
	</channel>
</rss>

