<?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>iaps &#187; PHP Development</title>
	<atom:link href="http://www.iaps.ca/developers-blog/category/php-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.iaps.ca/developers-blog</link>
	<description>interactivepoint solutions</description>
	<lastBuildDate>Wed, 18 Aug 2010 04:06:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Inherit jQuery Functionality for Dynamic Additions</title>
		<link>http://www.iaps.ca/developers-blog/2010/05/26/inherit-jquery-functionality-for-dynamic-additions/</link>
		<comments>http://www.iaps.ca/developers-blog/2010/05/26/inherit-jquery-functionality-for-dynamic-additions/#comments</comments>
		<pubDate>Wed, 26 May 2010 14:23:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP Development]]></category>

		<guid isPermaLink="false">http://www.iaps.ca/developers-blog/?p=302</guid>
		<description><![CDATA[Our latest project requires a lot of event driven functionality which attempts to reuse click() functions. Unfortunately when you dynamically add an element to the DOM it does not automatically inherit any functions that were loaded in $(document).ready(). For example: if you have a text-box and an &#8220;add&#8221; button (A) which, when clicked, adds a [...]]]></description>
			<content:encoded><![CDATA[<p>Our latest project requires a lot of event driven functionality which attempts to reuse click() functions. Unfortunately when you dynamically add an element to the DOM it does not automatically inherit any functions that were loaded in $(document).ready(). For example: if you have a text-box and an &#8220;add&#8221; button (A) which, when clicked, adds a new select-box with another &#8220;add&#8221; button (B) to add items to the select-box, (B) will not be able to perform the correct action if you pre-loaded the event.  In these cases, instead of using $(&#8220;#B&#8221;).click(function(){&#8230;}); use $(&#8220;#B&#8221;).live(&#8220;click&#8221;, function(){&#8230;});  Hopefully this solves some peoples problems!  You can read more about this at <a href="http://api.jquery.com/live/" target="_blank">jQuery.com</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.iaps.ca/developers-blog/2010/05/26/inherit-jquery-functionality-for-dynamic-additions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Image Sizing in HTML/CSS</title>
		<link>http://www.iaps.ca/developers-blog/2010/01/19/image-sizing-in-htmlcss/</link>
		<comments>http://www.iaps.ca/developers-blog/2010/01/19/image-sizing-in-htmlcss/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 15:26:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP Development]]></category>

		<guid isPermaLink="false">http://www.iaps.ca/developers-blog/?p=232</guid>
		<description><![CDATA[If you are working on a small project and no one has the time to go in and resize all images to fit a specified area, I have a quick fix for you. This fix only works when the specified area is restricted by either height or width: img {width: 180px; height: *%; }. This [...]]]></description>
			<content:encoded><![CDATA[<p>If you are working on a small project and no one has the time to go in and resize all images to fit a specified area, I have a quick fix for you. This fix only works when the specified area is restricted by either height or width: img {width: 180px; height: *%; }. This will resize the image height to a relative value of the scaled width.</p>
<p>It works both ways:</p>
<pre class="brush:css">img {height: 100px; width: *%;}
img {width: 100px; height: *%; }
</pre>
<p>This has only been tested in FireFox.  It may distort the image a little bit, but not nearly as much as it would if you used defined values for both width and height: img {width: 100px; height: 125px;}</p>
]]></content:encoded>
			<wfw:commentRss>http://www.iaps.ca/developers-blog/2010/01/19/image-sizing-in-htmlcss/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Playing music (mp3s) from ../public_html</title>
		<link>http://www.iaps.ca/developers-blog/2010/01/16/playing-music-mp3s-from-public_html/</link>
		<comments>http://www.iaps.ca/developers-blog/2010/01/16/playing-music-mp3s-from-public_html/#comments</comments>
		<pubDate>Sat, 16 Jan 2010 18:51:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP Development]]></category>

		<guid isPermaLink="false">http://www.iaps.ca/developers-blog/?p=227</guid>
		<description><![CDATA[Hey everyone. I&#8217;m looking for a solution that will allow mp3s to play from a private directory below the public_html directory. For instance, all my mp3s are in the &#8220;/home/user/private/&#8221; directory while my web-files reside in &#8220;/home/user/public_html/&#8221;. The problem with this setup is that the client side needs a client path: &#8220;www.iaps.ca/private&#8221;, but since the [...]]]></description>
			<content:encoded><![CDATA[<p>Hey everyone. I&#8217;m looking for a solution that will allow mp3s to play from a private directory below the public_html directory. For instance, all my mp3s are in the &#8220;/home/<em>user</em>/private/&#8221; directory while my web-files reside in &#8220;/home/<em>user</em>/public_html/&#8221;. The problem with this setup is that the client side needs a client path: &#8220;www.iaps.ca/private&#8221;, but since the &#8220;private&#8221; directory is below the &#8220;public_html&#8221; directory, the client-side cannot see those files.</p>
<p>Programmically, I can get a directory listing using PHP and display all the files and I could create a script that will show a pop-up download box for private files so people can download them, but I cannot play/embed them.</p>
<p>Any sort of solution that would prevent users from downloading files but allow those files to play or be embedded would be great.</p>
<p>If anyone knows of a solution, please let me know!</p>
<p>Thanks in advance.</p>
<p>~iaps</p>
]]></content:encoded>
			<wfw:commentRss>http://www.iaps.ca/developers-blog/2010/01/16/playing-music-mp3s-from-public_html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP-MySQLi bind_params() int or string?</title>
		<link>http://www.iaps.ca/developers-blog/2009/11/10/php-mysqli-bind_params-int-or-string/</link>
		<comments>http://www.iaps.ca/developers-blog/2009/11/10/php-mysqli-bind_params-int-or-string/#comments</comments>
		<pubDate>Tue, 10 Nov 2009 21:41:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP Development]]></category>

		<guid isPermaLink="false">http://iaps.ca/wordpress/?p=191</guid>
		<description><![CDATA[When using the mysqli_bind_params() function, you may want to consider listing int parameters as strings if the number may be greater than the maximum allowed value for an int. For Example: If you specify type &#8220;i&#8221; (integer), the maximum value it allows you to have is 2^32-1 or 2147483647. So, if you are using UNSIGNED [...]]]></description>
			<content:encoded><![CDATA[<p>When using the mysqli_bind_params() function, you may want to consider listing int parameters as strings if the number may be greater than the maximum allowed value for an int.</p>
<p>For Example:</p>
<p>If you specify type &#8220;i&#8221; (integer), the maximum value it allows you to have is 2^32-1 or 2147483647. So, if you are using UNSIGNED INTEGER or BIGINT in your database, then you are better off using &#8220;s&#8221; (string) for this.</p>
<p>Here&#8217;s a quick summary:</p>
<p>(un)signed TINYINT: i<br />
(un)signed SMALLINT: i<br />
(un)signed MEDIUMINT: i<br />
signed INT: i<br />
unsigned INT: s<br />
(un)signed BIGINT: s</p>
<p>(VAR)CHAR, (TINY/SMALL/MEDIUM/BIG)TEXT/BLOB should all have &#8220;s&#8221;.</p>
<p>FLOAT/REAL/DOUBLE (PRECISION) should all be &#8220;d&#8221;.</p>
<p>So when you call your dbUpdate function, the following is correct for the initial 2billion records, but would lead to problems after that:</p>
<pre class="brush:php">dbUpdate( $query, array("i", $bigIntValue) );</pre>
<p>This is how it should be done:</p>
<pre class="brush:php">dbUpdate( $query, array("s", $bigIntValue) );</pre>
<p>This advice is for MySQL Databases.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.iaps.ca/developers-blog/2009/11/10/php-mysqli-bind_params-int-or-string/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Image Uploads via Form Submission</title>
		<link>http://www.iaps.ca/developers-blog/2009/11/10/image-uploads-via-form-submission/</link>
		<comments>http://www.iaps.ca/developers-blog/2009/11/10/image-uploads-via-form-submission/#comments</comments>
		<pubDate>Tue, 10 Nov 2009 21:36:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP Development]]></category>

		<guid isPermaLink="false">http://iaps.ca/wordpress/?p=188</guid>
		<description><![CDATA[If any of you developers are having issues uploading files, remember to ensure enctype=&#8221;multipart/form-data&#8221; is an attribute of your form declaration: ...]]></description>
			<content:encoded><![CDATA[<p>If any of you developers are having issues uploading files, remember to ensure enctype=&#8221;multipart/form-data&#8221; is an attribute of your form declaration:</p>
<pre class="brush:php">
<form action="" method="post" name="frmName" enctype="multipart/form-data">...</form>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.iaps.ca/developers-blog/2009/11/10/image-uploads-via-form-submission/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Session-vars with header() transfer</title>
		<link>http://www.iaps.ca/developers-blog/2009/09/15/3/</link>
		<comments>http://www.iaps.ca/developers-blog/2009/09/15/3/#comments</comments>
		<pubDate>Tue, 15 Sep 2009 20:38:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP Development]]></category>

		<guid isPermaLink="false">http://iaps.ca/wordpress/?p=3</guid>
		<description><![CDATA[Having issues with $_SESSION['var']&#8216;s not being saved after you redirect the user via header()? Add exit(); after the header() call. Example: $_SESSION['emailed'] = true; header('Location: response.php'); exit(); Cheers!]]></description>
			<content:encoded><![CDATA[<p>Having issues with $_SESSION['var']&#8216;s not being saved after you redirect the user via header()? Add exit(); after the header() call.</p>
<p>Example:</p>
<pre class="brush:php">$_SESSION['emailed'] = true;
header('Location: response.php');
exit();</pre>
<p>Cheers!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.iaps.ca/developers-blog/2009/09/15/3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>number_format()</title>
		<link>http://www.iaps.ca/developers-blog/2009/07/15/number_format/</link>
		<comments>http://www.iaps.ca/developers-blog/2009/07/15/number_format/#comments</comments>
		<pubDate>Wed, 15 Jul 2009 20:42:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP Development]]></category>

		<guid isPermaLink="false">http://iaps.ca/wordpress/?p=10</guid>
		<description><![CDATA[We&#8217;ve tried many different methods to set precision for a number variable (specifically a currency amount) and we&#8217;d like to share the best method we&#8217;ve found: number_format( {number}, {precision}, 'decimal_separator', '1000s_separator' ); Example: number_format( $number, 2, '.', ',' ); Hope this helps! We have also tried using round( $number, {precision} ) but it ignores zeros(0) [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve tried many different methods to set precision for a number variable (specifically a currency amount) and we&#8217;d like to share the best method we&#8217;ve found:</p>
<pre class="brush:php">
number_format(
   {number},
   {precision},
   'decimal_separator',
   '1000s_separator' );
</pre>
<p>Example:</p>
<pre class="brush:php">number_format( $number, 2, '.', ',' );</pre>
<p>Hope this helps!</p>
<p>We have also tried using <a href="http://ca3.php.net/manual/en/function.round.php">round</a>( $number, {precision} ) but it ignores zeros(0) within the precision numbers.</p>
<p>Example:</p>
<pre class="brush:php">
$number = 9.90;
round( $number, 2 ); // returns: 9.9
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.iaps.ca/developers-blog/2009/07/15/number_format/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

