<?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>Kevin Pajak - Interactive Web Developer/Designer - BLOG &#187; Web Dev/Design</title>
	<atom:link href="http://www.kevinpajak.com/blog/category/web-devdesign/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kevinpajak.com/blog</link>
	<description>Creative visionary, digital entrepreneur.</description>
	<lastBuildDate>Tue, 13 Apr 2010 02:01:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>How to delete entire folders/sub-folders (with all files contained within) in PHP</title>
		<link>http://www.kevinpajak.com/blog/2010/03/31/how-to-delete-entire-folderssub-folders-with-all-files-contained-within-in-php/</link>
		<comments>http://www.kevinpajak.com/blog/2010/03/31/how-to-delete-entire-folderssub-folders-with-all-files-contained-within-in-php/#comments</comments>
		<pubDate>Wed, 31 Mar 2010 08:40:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Dev/Design]]></category>
		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://www.kevinpajak.com/blog/?p=395</guid>
		<description><![CDATA[Thanks to PeejAvery @CodeGuru.com for turning me on to this one (with the original code here). Here&#8217;s the code: function rrd($directory, $empty=FALSE){ if(substr($directory,-1) == &#8216;/&#8217;){$directory = substr($directory,0,-1);} if(!file_exists($directory) &#124;&#124; !is_dir($directory)){return FALSE;} elseif(!is_readable($directory)){return FALSE;} else{ $handle = opendir($directory); while (FALSE !== ($item = readdir($handle))){ if($item != &#8216;.&#8217; &#38;&#38; $item != &#8216;..&#8217;){ $path = $directory.&#8217;/&#8217;.$item; if(is_dir($path)){rrd($path);} else{unlink($path);} [...]]]></description>
			<content:encoded><![CDATA[<p>Thanks to PeejAvery @<a href="http://www.codeguru.com/forum/archive/index.php/t-366823.html" target="_blank"><b>CodeGuru.com</b></a> for turning me on to this one (with the <a href="http://lixlpixel.org/recursive_function/php/recursive_directory_delete/" target="_blank">original code here</a>).</p>
<p>Here&#8217;s the code:<span id="more-395"></span></p>
<p>function rrd($directory, $empty=FALSE){<br />
if(substr($directory,-1) == &#8216;/&#8217;){$directory = substr($directory,0,-1);}<br />
if(!file_exists($directory) || !is_dir($directory)){return FALSE;}<br />
elseif(!is_readable($directory)){return FALSE;}<br />
else{<br />
$handle = opendir($directory);<br />
while (FALSE !== ($item = readdir($handle))){<br />
if($item != &#8216;.&#8217; &amp;&amp; $item != &#8216;..&#8217;){<br />
$path = $directory.&#8217;/&#8217;.$item;<br />
if(is_dir($path)){rrd($path);}<br />
else{unlink($path);}<br />
}<br />
}<br />
closedir($handle);<br />
if($empty == FALSE){if(!rmdir($directory)){return FALSE;}}<br />
return TRUE;<br />
}<br />
}</p>
<p>(Just make sure you add a direct call to the PHP function, or you&#8217;ll get an error. Here&#8217;s how I did that:</p>
<p>Put <em>rrd($username, $empty=FALSE);</em> just beneath the function <img src='http://www.kevinpajak.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> .</p>
<p>Happy coding everybody.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kevinpajak.com/blog/2010/03/31/how-to-delete-entire-folderssub-folders-with-all-files-contained-within-in-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress plugins and widgets</title>
		<link>http://www.kevinpajak.com/blog/2010/02/16/wordpress-plugins-and-widgets/</link>
		<comments>http://www.kevinpajak.com/blog/2010/02/16/wordpress-plugins-and-widgets/#comments</comments>
		<pubDate>Tue, 16 Feb 2010 09:33:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Daily Journal]]></category>
		<category><![CDATA[Web Dev/Design]]></category>
		<category><![CDATA[Word Press]]></category>
		<category><![CDATA[wordpress plugins]]></category>
		<category><![CDATA[wordpress widgets]]></category>

		<guid isPermaLink="false">http://www.kevinpajak.com/blog/?p=374</guid>
		<description><![CDATA[I will make some WordPress plugins and widgets, and already thinking of possibly using them to &#8220;plug in&#8221; some of the aspects of my app dev work in various capacities, if site requirements call for it or could use it .]]></description>
			<content:encoded><![CDATA[<p>I will make some WordPress plugins and widgets, and already thinking of possibly using them to &#8220;plug in&#8221; some of the aspects of my app dev work in various capacities, if site requirements call for it or could use it <img src='http://www.kevinpajak.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> .</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kevinpajak.com/blog/2010/02/16/wordpress-plugins-and-widgets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to replace a backslash character in a string</title>
		<link>http://www.kevinpajak.com/blog/2010/02/12/how-to-replace-a-backslash-character-in-a-string/</link>
		<comments>http://www.kevinpajak.com/blog/2010/02/12/how-to-replace-a-backslash-character-in-a-string/#comments</comments>
		<pubDate>Fri, 12 Feb 2010 08:36:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Dev/Design]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.kevinpajak.com/blog/?p=363</guid>
		<description><![CDATA[Ah, so often it&#8217;s the little things eh&#8230; PROBLEM: I needed to find a way to &#8220;re-process&#8221; text a user enters for a live chat client I&#8217;m working on (in which I prevented MySQL database injections via the mysqli_real_escape_string function). The problem of course is that the text the user enters nicely protects you from [...]]]></description>
			<content:encoded><![CDATA[<p>Ah, so often it&#8217;s the little things eh&#8230;</p>
<p>PROBLEM: I needed to find a way to &#8220;re-process&#8221; text a user enters for a live chat client I&#8217;m working on (in which I prevented MySQL database injections via the <em>mysqli_real_escape_string</em> function). The problem of course is that the text the user enters nicely protects you from a MySQL database injection, BUT the text then comes back full of backslash (\) characters (not too cool looking huh). So, to remove these, you can use the following code (here, I use the PHP <em>str_replace</em> function:</p>
<p>// Convert escaped characters back to regular text<br />
$string = str_replace(&quot;\\&quot;, &quot;&quot;, $string);</p>
<p>Thanks to Geoff Muldoon for this one!:<br />
<A HREF="http://www.bigresource.com/Tracker/Track-php-OcMaOirM/" target="_blank"><B>How to replace a backslash character in a string?</B></A></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kevinpajak.com/blog/2010/02/12/how-to-replace-a-backslash-character-in-a-string/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>mysqli_real_escape requires TWO parameters!</title>
		<link>http://www.kevinpajak.com/blog/2010/02/11/mysqli_real_escape-requires-two-parameters/</link>
		<comments>http://www.kevinpajak.com/blog/2010/02/11/mysqli_real_escape-requires-two-parameters/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 08:27:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Dev/Design]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.kevinpajak.com/blog/?p=356</guid>
		<description><![CDATA[Props to this really useful post on PHPFreaks.com: http://www.phpfreaks.com/forums/index.php?topic=219045.0 I was having some issues with a mysqli_real_escape_string function that I had converted from mysql to mysqli I believe that the mere mysql version of this tag can function with just a $value, but the mysqli version requires TWO PARAMETERS: both the $connection variable, and the [...]]]></description>
			<content:encoded><![CDATA[<p>Props to this really useful post on PHPFreaks.com:<br />
<A HREF="http://www.phpfreaks.com/forums/index.php?topic=219045.0" target="_blank">http://www.phpfreaks.com/forums/index.php?topic=219045.0</A></p>
<p>I was having some issues with a mysqli_real_escape_string function that I had converted from mysql to <em>mysqli</em> I believe that the mere mysql version of this tag can function with just a <b>$value</b>, but the mysqli version requires TWO PARAMETERS: both the $connection variable, and the $string (whatever variable your particular function uses. The one I have here goes through all posts in a foreach statement and escapes the values of all posts using an array (to prevent MySQL injections).</p>
<p>Ex:<br />
  //This stops SQL Injection in POST vars<br />
  foreach ($_POST as $key =&gt; $value) {<br />
    $_POST[$key] = mysqli_real_escape_string($connection, $value);<br />
  }</p>
<p>$connection = whichever variable you would normally use to reference connection to your MySQL database(s).</p>
<p><A HREF="http://www.phpfreaks.com/forums/index.php?topic=219045.0" target="_blank"><B>THIS POST</B></A> solved my problem! (Thanks a lot Bendude14!)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kevinpajak.com/blog/2010/02/11/mysqli_real_escape-requires-two-parameters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to log out a user who closes the browser window</title>
		<link>http://www.kevinpajak.com/blog/2010/02/10/how-to-log-out-a-user-who-closes-the-browser-window/</link>
		<comments>http://www.kevinpajak.com/blog/2010/02/10/how-to-log-out-a-user-who-closes-the-browser-window/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 04:43:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Daily Journal]]></category>
		<category><![CDATA[Web Dev/Design]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[apps]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.kevinpajak.com/blog/?p=339</guid>
		<description><![CDATA[I would like to thank Brazilian software developer Daniel Melo for posting this code which helped me to solve a problem which was very pesky indeed, and in need of a solution. The problem occurred during a user&#8217;s logged-in session for a chat application I was building. This was the issue: the app is basically [...]]]></description>
			<content:encoded><![CDATA[<p>I would like to thank Brazilian software developer Daniel Melo for posting this code which helped me to solve a problem which was very pesky indeed, and in need of a solution. The problem occurred during a user&#8217;s logged-in session for a chat application I was building. This was the issue: the app is basically a live-chat client, which also shows all current users online, by name. If a logged-in user clicked the &#8220;Logout&#8221; link, all was good, no problem, his/her name was removed from the list of currently logged-on users. However, if the person just suddenly decided to end the chat session by just closing the browser and hitting &#8216;X&#8217; (as I myself might do!), the user was still showing as currently online, and NOT logged out (obviously this is an annoying issue). <span id="more-339"></span>After searching far and wide for this on the Internet, I came across the brilliant code I found at the link below on stackoverflow.com:</p>
<p><A HREF="http://stackoverflow.com/questions/1371757/how-to-kill-a-application-session-when-a-browser-window-is-closed" target="_blank"><B>&#8220;How to kill an application session when a browser window is closed?&#8221;</B></A></p>
<p>This code uses jQuery/Ajax in an absolutely brilliant and straightforward way. Basically what the code does is automatically load the contents of your &#8220;logoff.php&#8221; page, using the JavaScript <b>window.onbeforeunload</b> function (which is something that executes upon a user&#8217;s exiting the browser, refreshing the page, or submitting a form). Probably the most brilliant thing about this script is that it still uses the <em>onbeforeunload</em> function, BUT (and this was why it was of so much particular use to me for my particular case), let&#8217;s say that your web app page is relying on a form processor page that is on an external page, and not on the same page. If the user in this kind of case enters in their chat text, and then hits the submit button (but still is currently ON the page and actively participating in the current chat session), the typical <em>onbeforeunload</em> function if called, would execute (so basically, in this case, this would amount to the user being logged off every time he/she hit the &#8220;Post Message&#8221; button, and not JUST when the user closed the browser window).</p>
<p>So what this very clever script does is execute the contents of the script on your &#8220;logoff.php&#8221; page <b>onbeforeunload</b>, BUT <u>excepts the following cases:</u> (so it won&#8217;t get called if the user does the following things, and will only log the user out when he/she closes the browser window):</p>
<p>- Hitting the Submit button;<br />
- Clicking a link.</p>
<p>[The "magical" thing I will add too, after thinking about it, is that your 'logout.php' web page does not even have to be currently loaded on the browser - after all, the browser is being closed, right? This script executes your code all at once - like I said, fantastic! One other slightly unfortunate thing I found too in my extensive testing was that: this script works fine in Firefox and IE (and worked in Google Chrome, <em>after</em> not working the first time, insanely enough, but did not work in Opera or Safari :S). My sort of work-around for this was to at least add in code to my log-in page that sets the user's status to offline right away, then online once they are logged on and enter the chatroom].</p>
<p>Anyway, hope what I said here makes sense and is not too muddled an explanation, and&#8230; here is the code!:</p>
<div style="background: #EAE3E3; padding: 10px; border: 1px solid #000;">
/*<br />
* autoLogoff.js<br />
*<br />
* Every valid navigation (form submit, click on links) should<br />
* set this variable to true.<br />
*<br />
* If it is left to false the page will try to invalidate the<br />
* session via an AJAX call<br />
*/<br />
var validNavigation = false;</p>
<p>/*<br />
* Invokes the servlet /endSession to invalidate the session.<br />
* No HTML output is returned<br />
*/<br />
function endSession() {<br />
   $.get(&quot;&lt;whatever url will end your session&gt;&quot;);<br />
}</p>
<p>function wireUpEvents() {</p>
<p>  /*<br />
  * For a list of events that triggers onbeforeunload on IE<br />
  * check http://msdn.microsoft.com/en-us/library/ms536907(VS.85).aspx<br />
  */<br />
  window.onbeforeunload = function() {<br />
      if (!validNavigation) {<br />
         endSession();<br />
      }<br />
  }</p>
<p>  // Attach the event click for all links in the page<br />
  $(&quot;a&quot;).bind(&quot;click&quot;, function() {<br />
     validNavigation = true;<br />
  });</p>
<p>  // Attach the event submit for all forms in the page<br />
  $(&quot;form&quot;).bind(&quot;submit&quot;, function() {<br />
     validNavigation = true;<br />
  });</p>
<p>}</p>
<p>// Wire up the events as soon as the DOM tree is ready<br />
$(document).ready(function() {<br />
    wireUpEvents();  <br />
});
</div>
<p>From there, you just need to save this text in a file called &#8216;autoLogoff.js&#8217;, and call it toward the top of your page with the following code:</p>
<p>&lt;script type=&quot;text/javascript&quot; src=&quot;js/autoLogoff.js&quot;&gt;&lt;/script&gt;</p>
<p>I am making this post because this information was REALLY hard to find when I was searching for it, in the hopes that it can help you out with a similar project!</p>
<p>Again, here is the original posting for more and complete information:</p>
<p><A HREF="http://stackoverflow.com/questions/1371757/how-to-kill-a-application-session-when-a-browser-window-is-closed" target="_blank"><B>&#8220;How to kill an application session when a browser window is closed?&#8221;</B></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kevinpajak.com/blog/2010/02/10/how-to-log-out-a-user-who-closes-the-browser-window/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Customized WordPress theme for DailyWebGeek.com</title>
		<link>http://www.kevinpajak.com/blog/2010/02/05/customized-wordpress-theme-for-dailywebgeek-com/</link>
		<comments>http://www.kevinpajak.com/blog/2010/02/05/customized-wordpress-theme-for-dailywebgeek-com/#comments</comments>
		<pubDate>Sat, 06 Feb 2010 00:08:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Daily Journal]]></category>
		<category><![CDATA[Web Dev/Design]]></category>
		<category><![CDATA[Word Press]]></category>

		<guid isPermaLink="false">http://www.kevinpajak.com/blog/?p=341</guid>
		<description><![CDATA[Going to begin work soon on an original, fully customized WordPress theme for DailyWebGeek.com. More details to follow.]]></description>
			<content:encoded><![CDATA[<p>Going to begin work soon on an original, fully customized WordPress theme for DailyWebGeek.com. More details to follow.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kevinpajak.com/blog/2010/02/05/customized-wordpress-theme-for-dailywebgeek-com/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mobile version of web sites</title>
		<link>http://www.kevinpajak.com/blog/2010/02/03/mobile-version-of-web-sites/</link>
		<comments>http://www.kevinpajak.com/blog/2010/02/03/mobile-version-of-web-sites/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 03:06:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Dev/Design]]></category>
		<category><![CDATA[mobile]]></category>

		<guid isPermaLink="false">http://www.kevinpajak.com/blog/?p=332</guid>
		<description><![CDATA[Beginning preliminaries for this, doing research (very special thanks to Antonio Lupetti for his STUpendous article, &#8220;Best Practices To Develop Perfect Websites for iPhone and Mobile Devices!!) My Japanese pop-culture site, Jpopexpress.com, has a mobile functionality (which uses Google Reader), but certainly an independent, standalone mobile-optimized version of your website would be superior (and in [...]]]></description>
			<content:encoded><![CDATA[<p>Beginning preliminaries for this, doing research (very special thanks to Antonio Lupetti for his STUpendous article, &#8220;<A HREF="http://woorkup.com/2010/01/10/best-practices-to-develop-perfect-websites-for-iphone-and-mobile-devices/" target="_blank"><B>Best Practices To Develop Perfect Websites for iPhone and Mobile Devices</B></A>!!) My Japanese pop-culture site, Jpopexpress.com, has a <A HREF="http://m.jpopexpress.com/" target="_blank">mobile functionality</A> (which uses Google Reader), but certainly an independent, standalone mobile-optimized version of your website would be superior (and in addition, provide you with more distance from the &#8220;proprietary monopolies,&#8221; something that I have been increasingly focusing on lately <img src='http://www.kevinpajak.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  ).</p>
<p>[Oh, and FYI: just in case you didn't know already, dimensions for the iPhone screen are 320w x 480h <img src='http://www.kevinpajak.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> ]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kevinpajak.com/blog/2010/02/03/mobile-version-of-web-sites/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Live chat client showing list of current users online</title>
		<link>http://www.kevinpajak.com/blog/2010/02/03/live-chat-client-showing-list-of-current-users-online/</link>
		<comments>http://www.kevinpajak.com/blog/2010/02/03/live-chat-client-showing-list-of-current-users-online/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 02:48:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Daily Journal]]></category>
		<category><![CDATA[Social Media]]></category>
		<category><![CDATA[Web Dev/Design]]></category>
		<category><![CDATA[apps]]></category>

		<guid isPermaLink="false">http://www.kevinpajak.com/blog/?p=330</guid>
		<description><![CDATA[OK, so I&#8217;ve nearly got this puppy complete. It&#8217;s a live-chat client that will allow logged-on users (and only logged-on users, although I also have a version that guests can use) to make &#8220;posts&#8221; (just like to a &#8220;wall&#8221; on Facebook or Twitter), with the chat/comments page automatically refreshing every 500 milliseconds to show latest [...]]]></description>
			<content:encoded><![CDATA[<p>OK, so I&#8217;ve nearly got this puppy complete. It&#8217;s a live-chat client that will allow logged-on users (and only logged-on users, although I also have a version that guests can use) to make &#8220;posts&#8221; (just like to a &#8220;wall&#8221; on Facebook or Twitter), with the chat/comments page automatically refreshing every 500 milliseconds to show latest posts that other users have just made, in real-time. (one tentative name I have for it is a &#8220;living wall&#8221;). Last night, I added the ability to show a list of all users who are currently logged on, and hope to have this out of beta soon <img src='http://www.kevinpajak.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>These are just <em>some</em> of the advantages of this application:</p>
<p>- All posts can be saved into a database (into any table you so choose. You could, for example, insert the posts on tables related to individual topics or categories, current news items, a photo, or basically anything else you can put on an individual web page. [so to use this interactive chat client on a different page, just insert the posts into a different database table]).</p>
<p>- This can provide your web site users with a cross-functional, enhanced web user experience, allowing them to see who else in your online community or company is currently logged on, chat with them, comment on various pages across the site, view/update profile information, other content etc [sounds a little like Facebook, MySpace, or similar online communities doesn&#8217;t it, only think of the <u>advantages</u> of having this on your own site &#8216;).</p>
<p>- Flexibility. If you like, you can either destroy or save records of &#8220;chat sessions&#8221; (or series of wallposts too, if you&#8217;d like to use the app in that way).</p>
<p>More soon! <img src='http://www.kevinpajak.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> .</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kevinpajak.com/blog/2010/02/03/live-chat-client-showing-list-of-current-users-online/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Clearing contents of $_POST array values (to avoid re-submitting form data upon page refresh)</title>
		<link>http://www.kevinpajak.com/blog/2010/02/02/clearing-contents-of-_post-array-values-to-avoid-re-submitting-form-data-upon-page-refresh/</link>
		<comments>http://www.kevinpajak.com/blog/2010/02/02/clearing-contents-of-_post-array-values-to-avoid-re-submitting-form-data-upon-page-refresh/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 02:43:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Daily Journal]]></category>
		<category><![CDATA[Web Dev/Design]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.kevinpajak.com/blog/?p=327</guid>
		<description><![CDATA[After trying SEVERAL different possible methods &#038; suggestions, I finally was able to achieve this by pointing my form&#8217;s PHP processing page to another page, rather than the same page itself (I really wanted to keep everything &#8211; form as well as form-handling all on the same page, but I found that I had to [...]]]></description>
			<content:encoded><![CDATA[<p>After trying SEVERAL different possible methods &#038; suggestions, I finally was able to achieve this by pointing my form&#8217;s PHP processing page to another page, rather than the same page itself (I really wanted to keep everything &#8211; form as well as form-handling all on the same page, but I found that I had to do this in order to prevent the user from re-submitting form data [through the contents of the $_POST array] that does not clear upon a user&#8217;s hitting the refresh button on the browser). And following that, I had my form&#8217;s processing page script then re-direct back to the original page where the form was located:</p>
<p>    // redirect to the same page without the POST data<br />
    header(&#8220;Location: original-page-with-form.php&#8221;);<br />
    die;</p>
<p>Here are some of the pages I consulted in my research:</p>
<p><A HREF="http://www.thefutureoftheweb.com/blog/get-redirect-after-post" target="_blank">http://www.thefutureoftheweb.com/blog/get-redirect-after-post</A><br />
<A HREF="http://www.issociate.de/board/post/171234/Clear_POST_variables_on_page_refresh.html" target="_blank">http://www.issociate.de/board/post/171234/Clear_POST_variables_on_page_refresh.html</A><br />
<A HREF="http://www.mail-archive.com/php-list@yahoogroups.com/msg04635.html" target="_blank">http://www.mail-archive.com/php-list@yahoogroups.com/msg04635.html</A><br />
<A HREF="http://qaix.com/php-web-programming/437-896-clear-post-variables-read.shtml" target="_blank">http://qaix.com/php-web-programming/437-896-clear-post-variables-read.shtml</A></p>
<p>*NOTE: Of course, keep in mind that any header(&#8220;Location: PAGE&#8221;); PHP code must be included BEFORE any contents are outputted on the page, otherwise you will get the lovely &#8220;Headers already sent&#8221; PHP error.</p>
<p>Hope this can help anyone else out there who may be struggling with the same issue <img src='http://www.kevinpajak.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.kevinpajak.com/blog/2010/02/02/clearing-contents-of-_post-array-values-to-avoid-re-submitting-form-data-upon-page-refresh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8220;Twitter emulator&#8221; progress</title>
		<link>http://www.kevinpajak.com/blog/2010/01/30/twitter-emulator-progress/</link>
		<comments>http://www.kevinpajak.com/blog/2010/01/30/twitter-emulator-progress/#comments</comments>
		<pubDate>Sun, 31 Jan 2010 02:12:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Daily Journal]]></category>
		<category><![CDATA[Social Media]]></category>
		<category><![CDATA[Web Dev/Design]]></category>
		<category><![CDATA[apps]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://www.kevinpajak.com/blog/?p=316</guid>
		<description><![CDATA[OK, so now I&#8217;ve got my &#8220;Twitter emulator&#8221; working (complete post-to-wall, saving all posts into a database), now with post authors listed according to logged-on username [i.e. wall posting for logged on users only]. Almost out of beta, few final tests to go .]]></description>
			<content:encoded><![CDATA[<p>OK, so now I&#8217;ve got my &#8220;Twitter emulator&#8221; working (complete post-to-wall, saving all posts into a database), now with post authors listed according to logged-on username [i.e. wall posting for logged on users only]. Almost out of beta, few final tests to go <img src='http://www.kevinpajak.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> .</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kevinpajak.com/blog/2010/01/30/twitter-emulator-progress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
