<?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/"
	>

<channel>
	<title>Programming Resources</title>
	<atom:link href="http://ik.my/coding/feed/" rel="self" type="application/rss+xml" />
	<link>http://ik.my/coding</link>
	<description>Solutions, Functions and Search-&#38;-Found Formulas That I Use in My Web Applications</description>
	<pubDate>Wed, 06 May 2009 07:06:05 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>It&#8217;s my new home</title>
		<link>http://ik.my/coding/2009/05/06/its-my-new-home/</link>
		<comments>http://ik.my/coding/2009/05/06/its-my-new-home/#comments</comments>
		<pubDate>Wed, 06 May 2009 04:40:24 +0000</pubDate>
		<dc:creator>Coder</dc:creator>
		
		<category><![CDATA[Bulletin]]></category>

		<guid isPermaLink="false">http://ik.my/coding/?p=1</guid>
		<description><![CDATA[Welcome to my new home.
If you realize, it&#8217;s not imamkhalid.blogspot.com anymore. It&#8217;s shorter now &#8212; ik.my/coding.
What do you think about my new home? 
]]></description>
			<content:encoded><![CDATA[<p>Welcome to my new home.</p>
<p>If you realize, it&#8217;s not <a title="it's my old sweet home" href="http://imamkhalid.blogspot.com">imamkhalid.blogspot.com</a> anymore. It&#8217;s shorter now &#8212; <a title="yet smarter look n feel" href="http://ik.my/coding">ik.my/coding</a>.</p>
<p>What do you think about my new home? <img id="kosa-target-image" style="position: absolute; visibility: hidden; z-index: 2147483647; left: 565px; top: 22px;" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAUCAYAAACJfM0wAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAK8AAACvABQqw0mAAAAB90RVh0U29mdHdhcmUATWFjcm9tZWRpYSBGaXJld29ya3MgOLVo0ngAAAAWdEVYdENyZWF0aW9uIFRpbWUAMDQvMDQvMDhrK9wWAAACMElEQVQ4ja3SP2gTcRQH8O8vvUtIGmkqTY3SaMVFz6KDW2ywg4s4dGgXp3SyVLIIthCKQxCCuoZaXaSO/ilKd4sSdXRL0EWtIRYaSkXsJTH33utwSZM01xo0D353v+N+97l33/upQCAwFgwGfehiFYtFUxsYGPCmUqmv3YQTicSwBgCapnXTBQBoSinout5VVCnVDr/44B/OZH0xs6KMThCfR3LRs+aTycjvbwfCmawvduZkn7EwN4TBfheY90fXN6uYuffdyGQRu3apkmyDmzM2K8pYmBvC6kcLK+/KMEsWLCIQMSyLULUIFhH0HsGNycNYnDuO6PRno9lQSsFVh+tDQSEY6MHymzJKFQILgxkgYhALmBnMDLNsIf1sA8cG3VDYYzhFAWWfRBjCAiIbIxYQE1ga17+2GSICKLQYznCtiATEDK6BIrU5MUhgd0+NH+AIt+5jshdqgkpVwEwNkBgs9lyE4XY3nnLMWNf13QEAG1uE2JVe9PUC5JCvCMPrVpifOor1YnW34/pw7NjvVbmZ+3ljcTaMq5EjbRFJ07Gw8QfTd9fg96rc3o7bMh4f9SytvDenLl7/ZADAl5cjWF7dwmy60PaSeiPjo56lv2Ycnzi0Fp9AEgAu39x8+urtT9x5/GP74a2++LlTuumo76kDd4W9ALj9qIDIiOfBhdO+jtB9O279TFcuet77fD7Wn+sU7ajj1+kTSccb/wv/aymloEKh0Fg4HPZ2E87n86Udvs4FoWqwSHUAAAAASUVORK5CYII=" alt="" /></p>
]]></content:encoded>
			<wfw:commentRss>http://ik.my/coding/2009/05/06/its-my-new-home/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Basic AJAX code</title>
		<link>http://ik.my/coding/2009/03/15/basic-ajax-code/</link>
		<comments>http://ik.my/coding/2009/03/15/basic-ajax-code/#comments</comments>
		<pubDate>Sun, 15 Mar 2009 01:23:00 +0000</pubDate>
		<dc:creator>Coder</dc:creator>
		
		<category><![CDATA[Ajax]]></category>

		<guid isPermaLink="false">http://ik.my/coding/?p=16</guid>
		<description><![CDATA[If you want to have an AJAX application, this simple code is what you must have first.
var xml = make_xml();
function make_xml () {
 if (typeof XMLHttpRequest == 'undefined') {
   objects = Array(
     'Microsoft.XMLHTTP',
     'MSXML2.XMLHTTP',
     'MSXML2.XMLHTTP.3.0',
     'MSXML2.XMLHTTP.4.0',
  [...]]]></description>
			<content:encoded><![CDATA[<p>If you want to have an AJAX application, this simple code is what you must have first.</p>
<pre class="code">var xml = make_xml();
function make_xml () {
 if (typeof XMLHttpRequest == 'undefined') {
   objects = Array(
     'Microsoft.XMLHTTP',
     'MSXML2.XMLHTTP',
     'MSXML2.XMLHTTP.3.0',
     'MSXML2.XMLHTTP.4.0',
     'MSXML2.XMLHTTP.5.0'
   );
   for (i in objects) {
     try {
       return new ActiveXObject(objects[i]);
     }
 catch (e) {}
   }
 } else {
   return new XMLHttpRequest();
 }
}</pre>
<p>Save the code in &#8220;ajax.js&#8221; and call it in your HTML &lt;head&gt; section like this:</p>
<pre class="code">&lt;script language="javascript" type="text/javascript"  src="ajax.js"&gt;&lt;/script&gt;</pre>
<p>Next, you need to have a handle to handle submitted forms like this:</p>
<pre class="code">function handle_submit () {
 xml.open('post', root + '/');
 xml.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
 xml.onreadystatechange = function () {
  if (xml.readyState == 4) {
   data = xml.responseText.split ( "[BRK]" );
   get('div1').innerHTML = data[0];
   get('div2').innerHTML = data[1];
  } else {
   get('div1').innerHTML = 'Please wait';
   get('div2').innerHTML = 'Please wait';
  }
 }
 if (window.encodeURI(get('action').value) == 'action1') {
  xml.send('action=' + window.encodeURI(get('action').value) + '&amp;javascript=1&amp;
    field1=' + window.encodeURI(get('field1').value) + '&amp;field2=' +
     window.encodeURI(get('field2').value));
 } else if (window.encodeURI(get('action').value) == 'action2') {
  xml.send('action=' + window.encodeURI(get('action').value) + '&amp;javascript=1');
 } return false;
}</pre>
<p>In order to save time, I prefer to replace the long &#8220;document.getElementById&#8221; with a simple get() function, like this:</p>
<pre class="code">function get (id) {
 return document.getElementById(id);}</pre>
<p>Next, you need to have a handle to load onsubmit action, like this:</p>
<pre class="code">function load_handler () {
 get('action1').onsubmit = handle_submit;}</pre>
<p>Don&#8217;t forget to call the handle during page load, like this:</p>
<pre class="code">window.onload = load_handler;</pre>
<p>Using this basic AJAX code, you may do all the web interactivity using AJAX, easily.</p>
<p>All the other codes didn&#8217;t change at all, including HTML forms, PHP codes, etc. All you have to do is just synchronize the ID&#8217;s of your HTML forms with your &#8220;ajax.js&#8221; ID&#8217;s, otherwise it won&#8217;t recognize your request.</p>
<p>Any questions, please write on the comment form. Good luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://ik.my/coding/2009/03/15/basic-ajax-code/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Happy New Year!</title>
		<link>http://ik.my/coding/2009/01/22/happy-new-year/</link>
		<comments>http://ik.my/coding/2009/01/22/happy-new-year/#comments</comments>
		<pubDate>Thu, 22 Jan 2009 18:54:00 +0000</pubDate>
		<dc:creator>Coder</dc:creator>
		
		<category><![CDATA[Bulletin]]></category>

		<guid isPermaLink="false">http://ik.my/coding/?p=15</guid>
		<description><![CDATA[I&#8217;m writing this post to wish my Chinese friends a Gong Xi Fa Chai!
I also wanted to say sorry for not writing new codes to you. This is because I&#8217;m currently too busy doing my &#8220;Mega Project&#8221; for my big client.
I&#8217;m hoping to write more tips and tricks in programming more consistently.
Have a good day! [...]]]></description>
			<content:encoded><![CDATA[<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_PCK5VTvUlw4/SXjCEuDOJTI/AAAAAAAAADw/mac7oNg3L3g/s1600-h/gongxifachai.jpg"><img style="cursor: pointer; width: 400px; height: 242px;" src="http://3.bp.blogspot.com/_PCK5VTvUlw4/SXjCEuDOJTI/AAAAAAAAADw/mac7oNg3L3g/s400/gongxifachai.jpg" alt="" id="BLOGGER_PHOTO_ID_5294194748310824242" border="0" /></a><br />I&#8217;m writing this post to wish my Chinese friends a Gong Xi Fa Chai!</p>
<p>I also wanted to say sorry for not writing new codes to you. This is because I&#8217;m currently too busy doing my &#8220;Mega Project&#8221; for my big client.</p>
<p>I&#8217;m hoping to write more tips and tricks in programming more consistently.</p>
<p>Have a good day! <img src='http://ik.my/coding/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://ik.my/coding/2009/01/22/happy-new-year/feed/</wfw:commentRss>
		</item>
		<item>
		<title>I am still alive</title>
		<link>http://ik.my/coding/2008/11/30/i-am-still-alive/</link>
		<comments>http://ik.my/coding/2008/11/30/i-am-still-alive/#comments</comments>
		<pubDate>Sun, 30 Nov 2008 05:52:00 +0000</pubDate>
		<dc:creator>Coder</dc:creator>
		
		<category><![CDATA[Bulletin]]></category>

		<guid isPermaLink="false">http://ik.my/coding/?p=14</guid>
		<description><![CDATA[It has been a while I didn&#8217;t update this blog, since I was too busy managing a sports event at my place.
Today I&#8217;m not going to post anything about PHP functions. Instead, I would like to give a big thank my loyal readers on being such a concern asking me if I&#8217;m still alive.
I&#8217;m telling [...]]]></description>
			<content:encoded><![CDATA[<p>It has been a while I didn&#8217;t update this blog, since I was too busy managing a sports event at my place.</p>
<p>Today I&#8217;m not going to post anything about PHP functions. Instead, I would like to give a big thank my loyal readers on being such a concern asking me if I&#8217;m still alive.</p>
<p>I&#8217;m telling you guys, I&#8217;m still alive healthily and happily right now. I won 4 medals in the annual event — gold medals for badminton and rope pulling, silver medals for volleyball and soccer. What a worth busy moments!</p>
<p>After all, thank you for being so patient waiting for my updates. I&#8217;ll definitely update this blog soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://ik.my/coding/2008/11/30/i-am-still-alive/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Fortunate vs Unfortunate</title>
		<link>http://ik.my/coding/2008/10/18/fortunate-vs-unfortunate/</link>
		<comments>http://ik.my/coding/2008/10/18/fortunate-vs-unfortunate/#comments</comments>
		<pubDate>Sat, 18 Oct 2008 14:22:00 +0000</pubDate>
		<dc:creator>Coder</dc:creator>
		
		<category><![CDATA[Bulletin]]></category>

		<guid isPermaLink="false">http://ik.my/coding/?p=13</guid>
		<description><![CDATA[My hard disk crashed, totally damaged. This is real sick.
Fortunately it is still under warranty. Unfortunately it takes too much time to be replaced.
Fortunately not more than a month to wait. Unfortunately I lost all my data.
Fortunately I got backup. Unfortunately the last one was about three months ago.
Fortunately I can get back all my [...]]]></description>
			<content:encoded><![CDATA[<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://storage.msn.com/x1pbglk-vqL4Bt04bEEiLA9VzCDYoVNm8e9Yy_CrveqR-exYbkZUyG_tx0UCh7dwnwesyzPC9b5nxsFevpdFwe1mKDa5Yl0S6cUiMSC7jXeI6SpWLV1OD394GpSKg91z7iuoRkUjUTZHx3hXJCaHPLM_Q"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 326px;" src="http://storage.msn.com/x1pbglk-vqL4Bt04bEEiLA9VzCDYoVNm8e9Yy_CrveqR-exYbkZUyG_tx0UCh7dwnwesyzPC9b5nxsFevpdFwe1mKDa5Yl0S6cUiMSC7jXeI6SpWLV1OD394GpSKg91z7iuoRkUjUTZHx3hXJCaHPLM_Q" alt="" border="0" /></a>My hard disk crashed, totally damaged. This is real sick.</p>
<p>Fortunately it is still under warranty. Unfortunately it takes too much time to be replaced.</p>
<p>Fortunately not more than a month to wait. Unfortunately I lost all my data.</p>
<p>Fortunately I got backup. Unfortunately the last one was about three months ago.</p>
<p>Fortunately I can get back all my PHP applications. Unfortunately not the latest one.</p>
<p>Fortunately I can get back my MySQL data, too. Unfortunately not the latest one, too.</p>
<p>Fortunately I can set back my work after the new one arrived. Unfortunately I didn&#8217;t backup all my software as they eat lots of disk space.</p>
<p>OMG, I don&#8217;t know what to do, where to start, how to complete. It&#8217;s real hard.</p>
<p>What do you think when fortunate vs unfortunate. Which one wins?</p>
]]></content:encoded>
			<wfw:commentRss>http://ik.my/coding/2008/10/18/fortunate-vs-unfortunate/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Prevent accidental window closing: alert onbeforeUnLoad</title>
		<link>http://ik.my/coding/2008/09/27/prevent-accidental-window-closing-alert-onbeforeunload/</link>
		<comments>http://ik.my/coding/2008/09/27/prevent-accidental-window-closing-alert-onbeforeunload/#comments</comments>
		<pubDate>Sat, 27 Sep 2008 16:00:00 +0000</pubDate>
		<dc:creator>Coder</dc:creator>
		
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://ik.my/coding/?p=12</guid>
		<description><![CDATA[Today, I&#8217;m going to show you how to stop your visitor to close window of your site, using JavaScript.
It&#8217;s useful when they have unfinished processes, or unsaved data, in which they whether accidentally or deliberately clicked on the close button of your page.
It&#8217;s also useful for your marketing strategy, like one-time offer, final discounts, and [...]]]></description>
			<content:encoded><![CDATA[<p>Today, I&#8217;m going to show you how to stop your visitor to close window of your site, using JavaScript.</p>
<p>It&#8217;s useful when they have unfinished processes, or unsaved data, in which they whether accidentally or deliberately clicked on the close button of your page.</p>
<p>It&#8217;s also useful for your marketing strategy, like one-time offer, final discounts, and so on.</p>
<p>Simple. First, use this following function. Then I&#8217;ll show you with 3 situations for example.</p>
<div class="code">&lt;script&gt;<br />var askFirst = false;<br />function preventerOn() {<br />    askFirst = true;<br />}</p>
<p>function preventerOff() {<br />    askFirst = false;<br />}<br />window.onbeforeunload = sureUnload;<br />function sureUnload() {<br />    if (askFirst)<br />        return &#8220;Are you sure you want to exit this page?&#8221;;<br />}<br />&lt;/script&gt;</div>
<p>Situation 1, if you want to prevent window closing from the beginning, you may want to use the body tag, like this:</p>
<div class="code">&lt;body onload=&#8221;return preventerOn();&#8221;&gt;</div>
<p>Situation 2, if you want to prevent window closing when your visitor enter something in a form, use it like this:</p>
<div class="code">&lt;input type=&#8221;text&#8221; name=&#8221;input1&#8243; onchange=&#8221;return preventerOn();&#8221;&gt;</div>
<p>Situation 3, if you want to prevent window closing before reached an amount of time (i.e: 20 seconds), you may add this one to the script above:</p>
<div class="code">function setTimer() {<br />    preventerOn();<br />    setTimeout(&#8221;clear();&#8221;,20000); // 1000 is for 1 second, so 20000 is for 20 seconds<br />}<br />function clear() {<br />    preventerOff();<br />}</div>
<p>You may need to change in the body tag, from this:</p>
<div class="code">&lt;body onload=&#8221;return preventerOn();&#8221;&gt;</div>
<p>to this:</p>
<div class="code">&lt;body onload=&#8221;return setTimer();&#8221;&gt;</div>
<p>That&#8217;s all. </p>
<p>If you have any questions regarding this, please feel free and don&#8217;t hesitate to ask me through the comment form. </p>
<p>Thank you.</p>
]]></content:encoded>
			<wfw:commentRss>http://ik.my/coding/2008/09/27/prevent-accidental-window-closing-alert-onbeforeunload/feed/</wfw:commentRss>
		</item>
		<item>
		<title>More elaboration on &#8217;signed-by&#8217; and &#8216;mailed-by&#8217;</title>
		<link>http://ik.my/coding/2008/09/22/more-elaboration-on-signed-by-and-mailed-by/</link>
		<comments>http://ik.my/coding/2008/09/22/more-elaboration-on-signed-by-and-mailed-by/#comments</comments>
		<pubDate>Mon, 22 Sep 2008 15:09:00 +0000</pubDate>
		<dc:creator>Coder</dc:creator>
		
		<category><![CDATA[function]]></category>

		<category><![CDATA[mail]]></category>

		<category><![CDATA[mailed-by]]></category>

		<category><![CDATA[php]]></category>

		<category><![CDATA[signed-by]]></category>

		<guid isPermaLink="false">http://ik.my/coding/?p=11</guid>
		<description><![CDATA[A friend of mine, Tim recently asked me about the mail function in PHP programming which I wrote on how to edit or remove the default &#8217;signed-by&#8217; or &#8216;mailed-by&#8217; label during the sending activity.
His question is, where to put the code? As far as I&#8217;m concerned, I was not talking about the code, or even [...]]]></description>
			<content:encoded><![CDATA[<p>A friend of mine, <a href="http://www.blogger.com/profile/14747528089858476910">Tim</a> recently asked me about the mail function in PHP programming which I wrote on how to <a href="http://imamkhalid.blogspot.com/2008/09/edit-or-remove-signed-by-or-mailed-by.html">edit or remove the default &#8217;signed-by&#8217; or &#8216;mailed-by&#8217;</a> label during the sending activity.</p>
<p>His question is, where to put the code? As far as I&#8217;m concerned, I was not talking about the code, or even code positioning.</p>
<p>I&#8217;m talking about a particular technique that we would use in order to edit or to remove the distracting label when we use mail() function in our code (programming).</p>
<p><span style="font-weight: bold;">The real situation yet to be explained</span><br />The default value for the labels is usually the domain name of the server hosting company we run from.</p>
<p>In example, let say you use a web hosting from the well-known <a href="http://www.jdoqocy.com/click-2642481-10376734">BlueHost</a> company. Then you planned to send mass email to your friends about your new site, without revealing your friends&#8217; details among them.</p>
<p>So all you need to do is having your list in a database, and then use loop function to send mail to them, one by one, using the php mail() function. Perhaps, you&#8217;ll use a fake email, or your self-hosted email, or even your true email from <a href="http://mail.google.com">Google mail</a> or <a href="http://mail.yahoo.com">Yahoo! mail</a>.</p>
<p>Unfortunately, when using this method, recipients will see the header (if they checked on it) of the email, stated that the mail you sent was mailed by (in example) mailserver#.bluehost.com.</p>
<p>This is what we don&#8217;t like to see. It&#8217;ll tell the recipients what hosting service we are using.</p>
<p>So, in order to remove or edit the default value, we need to do those things that I explained earlier. To see the post, <a href="http://imamkhalid.blogspot.com/2008/09/edit-or-remove-signed-by-or-mailed-by.html">click here</a>.</p>
<p>I hope my friend Tim will get what I was actually saying. What say you?</p>
]]></content:encoded>
			<wfw:commentRss>http://ik.my/coding/2008/09/22/more-elaboration-on-signed-by-and-mailed-by/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Edit or remove &#8217;signed-by&#8217; or &#8216;mailed-by&#8217;</title>
		<link>http://ik.my/coding/2008/09/20/edit-or-remove-signed-by-or-mailed-by/</link>
		<comments>http://ik.my/coding/2008/09/20/edit-or-remove-signed-by-or-mailed-by/#comments</comments>
		<pubDate>Sat, 20 Sep 2008 01:46:00 +0000</pubDate>
		<dc:creator>Coder</dc:creator>
		
		<category><![CDATA[function]]></category>

		<category><![CDATA[mail]]></category>

		<category><![CDATA[mailed-by]]></category>

		<category><![CDATA[php]]></category>

		<category><![CDATA[signed-by]]></category>

		<guid isPermaLink="false">http://ik.my/coding/?p=9</guid>
		<description><![CDATA[Recently I was trying to remove the labels &#8217;signed-by&#8217; or &#8216;mailed-by&#8217; which displayed the server name of my web hosting company when I do mailing activities from PHP script.
I was actually wanted to have my domain or perhaps my &#8216;fake&#8217; domain address to be there. I don&#8217;t want to display the web hosting company.
The labels [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I was trying to remove the labels &#8217;signed-by&#8217; or &#8216;mailed-by&#8217; which displayed the server name of my web hosting company when I do mailing activities from PHP script.</p>
<p>I was actually wanted to have my domain or perhaps my &#8216;fake&#8217; domain address to be there. I don&#8217;t want to display the web hosting company.</p>
<p>The labels are like distracting me as a mailer, because I don&#8217;t really need that to be displayed. They&#8217;re like disturbing my privacy.</p>
<p>After having some research, I finally found the answer. There&#8217;s actually five arguments in the <span style="font-family:courier new;">mail()</span> function, instead of just four like this:</p>
<blockquote><div class="code">mail($mailto,$subject,$message,$header);</div>
</blockquote>
<p>The fifth argument is the answer to my question. I believe some of you might get in the same situation.</p>
<p>So lets get straight to the point. Choose one of these below:
<ol>
<li>You want your domain to be displayed; or</li>
<li>You want nothing to be displayed.</li>
</ol>
<p>You can&#8217;t have them to display other than that. I.e: You want it to display &#8217;signed-by: google.com&#8217; or &#8216;mailed-by: yahoo.com&#8217;. No you can&#8217;t have it. Just choose one of the stated above.</p>
<p>If you want the first choice, do this:
<ol>
<li>Create an email address from your domain, or take one you&#8217;ve had, like admin@yourdomain.com.</li>
<li>Set your code like this:
<div class="code">mail($mailto,$subject,$message,$header,&#8217;-f admin@yourdomain.com&#8217;);</div>
</li>
<li>There&#8217;s no number 3, you&#8217;re done!</li>
</ol>
<p>If you want the second choice, you only have to do the second one in the first choice. You may change the &#8216;admin@yourdomain.com&#8217; to any email you&#8217;d like, i.e: myself@yahoo.com.</p>
<p>Easy, huh?</p>
]]></content:encoded>
			<wfw:commentRss>http://ik.my/coding/2008/09/20/edit-or-remove-signed-by-or-mailed-by/feed/</wfw:commentRss>
		</item>
		<item>
		<title>I&#8217;ll be continuing from now on&#8230;</title>
		<link>http://ik.my/coding/2008/09/17/ill-be-continuing-from-now-on/</link>
		<comments>http://ik.my/coding/2008/09/17/ill-be-continuing-from-now-on/#comments</comments>
		<pubDate>Wed, 17 Sep 2008 15:52:00 +0000</pubDate>
		<dc:creator>Coder</dc:creator>
		
		<category><![CDATA[Bulletin]]></category>

		<guid isPermaLink="false">http://ik.my/coding/?p=8</guid>
		<description><![CDATA[I&#8217;ve paused my blogging activity for such a long period. I think I have to go back to work, from now on.

Recently, I signed up for EntreCard. I wanted to see how exactly this program works. If I find this social networking tool helping me much i building my personal ranking, I would stay. Otherwise, [...]]]></description>
			<content:encoded><![CDATA[<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://entrecard.com"><img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 200px;" src="http://entrecard.s3.amazonaws.com/images/logo_and_header.png" border="0" alt="" /></a>I&#8217;ve paused my blogging activity for such a long period. I think I have to go back to work, from now on.
<div></div>
<div>Recently, I signed up for <a href="http://entrecard.com/">EntreCard</a>. I wanted to see how exactly this program works. If I find this social networking tool helping me much i building my personal ranking, I would stay. Otherwise, I&#8217;m moving away. </div>
<div></div>
<div>So let&#8217;s give it some time. Maybe I should try this for about a month or two. What say you? </div>
]]></content:encoded>
			<wfw:commentRss>http://ik.my/coding/2008/09/17/ill-be-continuing-from-now-on/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Save Time on Submitting Forms</title>
		<link>http://ik.my/coding/2007/10/18/save-time-on-submitting-forms/</link>
		<comments>http://ik.my/coding/2007/10/18/save-time-on-submitting-forms/#comments</comments>
		<pubDate>Thu, 18 Oct 2007 17:34:00 +0000</pubDate>
		<dc:creator>Coder</dc:creator>
		
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://ik.my/coding/?p=6</guid>
		<description><![CDATA[I always involved in making applications that submit forms to databases. In order to save time, I just copy this function to all my applications - because they&#8217;re a great time saving function that suits all my applications. Here I&#8217;ll show you step by step on how I made the function:  
(This is the [...]]]></description>
			<content:encoded><![CDATA[<p>I always involved in making applications that submit forms to databases. In order to save time, I just copy this function to all my applications - because they&#8217;re a great time saving function that suits all my applications. Here I&#8217;ll show you step by step on how I made the function:  </p>
<p>(This is the form example)
<div class="code">&lt;form method=&#8221;post&#8221; action=&#8221;/process&#8221;&gt;<br />Input 1: &lt;input type=&#8221;text&#8221; name=&#8221;input1&#8243;&gt;<br />Input 2: &lt;input type=&#8221;text&#8221; name=&#8221;input2&#8243;&gt;<br />Input 3: &lt;input type=&#8221;text&#8221; name=&#8221;input3&#8243;&gt;<br />&lt;input type=&#8221;hidden&#8221; name=&#8221;action&#8221; value=&#8221;submitForm1&#8243;&gt;<br />&lt;input type=&#8221;submit&#8221; value=&#8221;Submit&#8221;&gt;<br />&lt;/form&gt;</div>
<p>Note two important things in the form above:  
<ol>
<li>action value; and</li>
<p>
<li>form action</li>
</ol>
<p>The action value will ensure the form to be submitted the right way whereas the form action will lead itself to <code>index.php</code>. </p>
<p>In the <code>index.php</code>, I set a condition - <code>switch ( <a href="http://imamkhalid.blogspot.com/2007/10/how-to-customize-ugly-link-structure.html" title="What's portion(1)?">portion(1)</a> ) case &#8220;process&#8221;;</code>. </p>
<p>The <code>"process"</code> condition goes like this: </p>
<div class="code">&lt;?php<br />if ( isset($_POST['action']) &#038;&#038; $_POST['action'] == &#8220;submitForm1&#8243; ) {<br />&nbsp;&nbsp;if ( submitForm($_POST) ) echo &#8220;Successful!&#8221;;<br />&nbsp;&nbsp;else echo &#8220;Failed!&#8221;;<br />}<br />?&gt;</div>
<p>Do you realize - I sent the data using array - <code>$_POST</code> array! This is what I&#8217;m talking about. Sorry for the long intro&#8230; <img src='http://ik.my/coding/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>Ok now let&#8217;s see what is inside the submitForm() function. In brief, the function must contain: 
<ol>
<li>key assigning process for each input value;</li>
<p>
<li>character control using str_replace function;</li>
<p>
<li>additional controls and conditions; and</li>
<p>
<li>SQL statement structures;</li>
<p></ol>
<p>I set the head like this: 
<div class="code">function submitForm($post,$additional_input=&#8221;,$unwanted_input=&#8221;)</div>
<p>Now we&#8217;ve covered the main concept and some code go through. I think I&#8217;ve to stop here for now. See you in Part II!</p>
]]></content:encoded>
			<wfw:commentRss>http://ik.my/coding/2007/10/18/save-time-on-submitting-forms/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
