<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Nimesha&#039;s Blog</title>
	<atom:link href="http://nimesha1984.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://nimesha1984.wordpress.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Sun, 28 Mar 2010 06:46:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='nimesha1984.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Nimesha&#039;s Blog</title>
		<link>http://nimesha1984.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://nimesha1984.wordpress.com/osd.xml" title="Nimesha&#039;s Blog" />
	<atom:link rel='hub' href='http://nimesha1984.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Uploaded this blog to my testing website</title>
		<link>http://nimesha1984.wordpress.com/2010/03/28/uploaded-this-blog-to-my-testing-website/</link>
		<comments>http://nimesha1984.wordpress.com/2010/03/28/uploaded-this-blog-to-my-testing-website/#comments</comments>
		<pubDate>Sun, 28 Mar 2010 06:45:20 +0000</pubDate>
		<dc:creator>nimesha</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://nimesha1984.wordpress.com/?p=187</guid>
		<description><![CDATA[This blog content was uploaded to my testing website..Please refer that for more posts&#8230;.New Posts and new categories are available here.. www.nimesha.comyr.com www.nimesha.200u.com Under these websites BLOG is available as a separate Tag&#8230;<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nimesha1984.wordpress.com&amp;blog=10268184&amp;post=187&amp;subd=nimesha1984&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This blog content was uploaded to my testing website..Please refer that for more posts&#8230;.New Posts and new categories are available here..  <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>www.nimesha.comyr.com<br />
www.nimesha.200u.com</p>
<p>Under these websites BLOG is available as a separate Tag&#8230; <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nimesha1984.wordpress.com/187/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nimesha1984.wordpress.com/187/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nimesha1984.wordpress.com/187/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nimesha1984.wordpress.com/187/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nimesha1984.wordpress.com/187/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nimesha1984.wordpress.com/187/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nimesha1984.wordpress.com/187/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nimesha1984.wordpress.com/187/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nimesha1984.wordpress.com/187/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nimesha1984.wordpress.com/187/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nimesha1984.wordpress.com/187/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nimesha1984.wordpress.com/187/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nimesha1984.wordpress.com/187/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nimesha1984.wordpress.com/187/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nimesha1984.wordpress.com&amp;blog=10268184&amp;post=187&amp;subd=nimesha1984&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nimesha1984.wordpress.com/2010/03/28/uploaded-this-blog-to-my-testing-website/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>6.950000 79.900000</georss:point>
		<geo:lat>6.950000</geo:lat>
		<geo:long>79.900000</geo:long>
		<media:content url="http://0.gravatar.com/avatar/215439848960dae361013134954fdc7a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nimesha</media:title>
		</media:content>
	</item>
		<item>
		<title>Happy New Year</title>
		<link>http://nimesha1984.wordpress.com/2010/01/01/happy-new-year/</link>
		<comments>http://nimesha1984.wordpress.com/2010/01/01/happy-new-year/#comments</comments>
		<pubDate>Fri, 01 Jan 2010 12:23:45 +0000</pubDate>
		<dc:creator>nimesha</dc:creator>
				<category><![CDATA[miscellaneous]]></category>

		<guid isPermaLink="false">http://nimesha1984.wordpress.com/?p=185</guid>
		<description><![CDATA[I wish You all A Very Happy New Year 2010&#8230;..<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nimesha1984.wordpress.com&amp;blog=10268184&amp;post=185&amp;subd=nimesha1984&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I wish You all A Very Happy New Year 2010&#8230;.. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nimesha1984.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nimesha1984.wordpress.com/185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nimesha1984.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nimesha1984.wordpress.com/185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nimesha1984.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nimesha1984.wordpress.com/185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nimesha1984.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nimesha1984.wordpress.com/185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nimesha1984.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nimesha1984.wordpress.com/185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nimesha1984.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nimesha1984.wordpress.com/185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nimesha1984.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nimesha1984.wordpress.com/185/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nimesha1984.wordpress.com&amp;blog=10268184&amp;post=185&amp;subd=nimesha1984&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nimesha1984.wordpress.com/2010/01/01/happy-new-year/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>6.950000 79.900000</georss:point>
		<geo:lat>6.950000</geo:lat>
		<geo:long>79.900000</geo:long>
		<media:content url="http://0.gravatar.com/avatar/215439848960dae361013134954fdc7a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nimesha</media:title>
		</media:content>
	</item>
		<item>
		<title>Sliding Down Calender</title>
		<link>http://nimesha1984.wordpress.com/2009/11/18/143/</link>
		<comments>http://nimesha1984.wordpress.com/2009/11/18/143/#comments</comments>
		<pubDate>Wed, 18 Nov 2009 12:12:48 +0000</pubDate>
		<dc:creator>nimesha</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://nimesha1984.wordpress.com/?p=143</guid>
		<description><![CDATA[javascriptFile2 CssFile2 cssFile1 javascriptFile1 This is a calender which will display when we click on the text box.The calender will slide down when the visitor click on the text box&#8230;. All the javascript and CSS files are attached at the top of this post.Just copy and save with the names given in the top of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nimesha1984.wordpress.com&amp;blog=10268184&amp;post=143&amp;subd=nimesha1984&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="/javascriptfile2/">javascriptFile2</a> <a href="/cssfile2/">CssFile2</a> <a href="/cssfile1/">cssFile1</a> <a href="/javascriptfile1/">javascriptFile1</a></p>
<p>This is a calender which will display when we click on the text box.The calender will slide down when the visitor click on the text box&#8230;. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>All the javascript and CSS files are attached at the top of this post.Just copy and save with the names given in the top of those files.save these files in to the same folder where calender.php file is included.</p>
<p><img class="alignleft size-full wp-image-147" title="cal1" src="http://nimesha1984.files.wordpress.com/2009/11/cal1.jpg?w=470" alt=""   /><br />
<img class="alignleft size-full wp-image-148" title="calender1" src="http://nimesha1984.files.wordpress.com/2009/11/calender1.jpg?w=470" alt=""   /><br />
<img class="alignleft size-full wp-image-149" title="cal2" src="http://nimesha1984.files.wordpress.com/2009/11/cal2.jpg?w=470" alt=""   /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>The following is the php code&#8230;.<br />
&lt;html&gt;&lt;title&gt;Calender&lt;/title&gt;</p>
<p>&lt;head&gt;</p>
<p>&lt;LINK href=&#8221;ui.datepicker.css&#8221; rel=&#8221;stylesheet&#8221; type=&#8221;text/css&#8221;&gt;<br />
&lt;LINK href=&#8221;ui.theme.css&#8221; rel=&#8221;stylesheet&#8221; type=&#8221;text/css&#8221;&gt;<br />
&lt;script src=&#8221;jquery-1.3.2.js&#8221; type=&#8221;text/javascript&#8221;&gt;&lt;/script&gt;<br />
&lt;script src=&#8221;ui.datepicker.js&#8221; type=&#8221;text/javascript&#8221;&gt;&lt;/script&gt;<br />
&lt;script&gt;</p>
<p>function getStartDate(){<br />
$(&#8216;#txtStartDate&#8217;).datepicker({showButtonPanel: false});<br />
}</p>
<p>&lt;/script&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
Start Date : &lt;input type=&#8221;text&#8221; id=&#8221;txtStartDate&#8221; onFocus=&#8221;getStartDate()&#8221;&gt;</p>
<p>&lt;/body&gt;<br />
&lt;/html&gt;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nimesha1984.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nimesha1984.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nimesha1984.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nimesha1984.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nimesha1984.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nimesha1984.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nimesha1984.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nimesha1984.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nimesha1984.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nimesha1984.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nimesha1984.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nimesha1984.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nimesha1984.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nimesha1984.wordpress.com/143/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nimesha1984.wordpress.com&amp;blog=10268184&amp;post=143&amp;subd=nimesha1984&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nimesha1984.wordpress.com/2009/11/18/143/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/215439848960dae361013134954fdc7a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nimesha</media:title>
		</media:content>

		<media:content url="http://nimesha1984.files.wordpress.com/2009/11/cal1.jpg" medium="image">
			<media:title type="html">cal1</media:title>
		</media:content>

		<media:content url="http://nimesha1984.files.wordpress.com/2009/11/calender1.jpg" medium="image">
			<media:title type="html">calender1</media:title>
		</media:content>

		<media:content url="http://nimesha1984.files.wordpress.com/2009/11/cal2.jpg" medium="image">
			<media:title type="html">cal2</media:title>
		</media:content>
	</item>
		<item>
		<title>Move options in a combo to another Combo</title>
		<link>http://nimesha1984.wordpress.com/2009/11/13/move-options-in-a-combo-to-another-combo/</link>
		<comments>http://nimesha1984.wordpress.com/2009/11/13/move-options-in-a-combo-to-another-combo/#comments</comments>
		<pubDate>Fri, 13 Nov 2009 10:15:07 +0000</pubDate>
		<dc:creator>nimesha</dc:creator>
				<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://nimesha1984.wordpress.com/?p=124</guid>
		<description><![CDATA[This is one of selection methods used in web developing. Here we can use javascript to get this job done&#8230; This is the HTML form I used&#8230;. &#60;html&#62; &#60;head&#62; &#60;title&#62;Move items from one combo to another&#60;/title&#62; &#60;script type=&#34;text/javascript&#34; src=&#34;moveItems.js&#34;&#62;&#60;/script&#62; &#60;body&#62; &#60;table align=&#34;centre&#34; class=&#34;box-table-a&#34; width=&#34;80%&#34; id=&#34;tblFields&#34;&#62; &#60;tr&#62; &#60;td&#62; &#60;select size=5 name=select_columns multiple=yes id=available_columns&#62; &#60;option value =&#34;Name&#34;&#62;Name&#60;/option&#62; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nimesha1984.wordpress.com&amp;blog=10268184&amp;post=124&amp;subd=nimesha1984&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is one of selection methods used in web developing. Here we can use javascript to get this job done&#8230; <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><img src="http://nimesha1984.files.wordpress.com/2009/11/combo.jpg?w=470&#038;h=112" alt="combo" title="combo" width="470" height="112" class="alignleft size-full wp-image-126" /></p>
<p>This is the HTML form I used&#8230;.</p>
<p>&lt;html&gt;<br />
    &lt;head&gt;<br />
        &lt;title&gt;Move items from one combo to another&lt;/title&gt;</p>
<p>&lt;script type=&quot;text/javascript&quot; src=&quot;<strong>moveItems.js</strong>&quot;&gt;&lt;/script&gt;</p>
<p>&lt;body&gt;<br />
&lt;table align=&quot;centre&quot; class=&quot;box-table-a&quot; width=&quot;80%&quot; id=&quot;tblFields&quot;&gt;<br />
  &lt;tr&gt;<br />
    &lt;td&gt;</p>
<p>	&lt;select size=5 name=select_columns multiple=yes id=available_columns&gt;<br />
		&lt;option value =&quot;Name&quot;&gt;Name&lt;/option&gt;<br />
		&lt;option value =&quot;Age&quot;&gt;Age&lt;/option&gt;<br />
		&lt;option value =&quot;Gender&quot;&gt;Gender&lt;/option&gt;<br />
		&lt;option value =&quot;Address&quot;&gt;Address&lt;/option&gt;<br />
	&lt;/select&gt;</p>
<p>    &lt;/td&gt;<br />
    &lt;td&gt;</p>
<p>      &lt;br&gt;<br />
      &lt;input type=&quot;button&quot; id=&quot;move_right&quot; onclick=&quot;moveRightAll()&quot; value=&quot;Move All &gt;&gt;&quot;&gt;<br />
      &lt;br&gt;<br />
      &lt;input type=&quot;button&quot; id=&quot;move_right&quot; onclick=&quot;moveRight()&quot; value=&quot;&gt;&gt;&quot;&gt;<br />
      &lt;br&gt;<br />
      &lt;input type=&quot;button&quot; id=&quot;move_left&quot; onclick=&quot;moveLeft()&quot; value=&quot;&lt;&lt;&quot;&gt;<br />
      &lt;br&gt;<br />
      &lt;input type=&quot;button&quot; id=&quot;move_left&quot; onclick=&quot;moveLeftAll()&quot; value=&quot;&lt;&lt; Move All&quot;&gt;<br />
      &lt;br&gt;</p>
<p>    &lt;/td&gt;<br />
    &lt;td&gt;<br />
        &lt;select name=&quot;selectedItems&quot; id=&quot;selected_columns&quot; size=&quot;5&quot; multiple=&quot;yes&quot;&gt;<br />
        &lt;/select&gt;<br />
    &lt;/td&gt;<br />
  &lt;/tr&gt;</p>
<p>&lt;/table&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</p>
<p>Following is the javascript file I used &#8230;<br />
<strong>moveItems.js</strong></p>
<p>// JavaScript Document</p>
<p>//moving all items<br />
function moveRightAll(){</p>
<p>	var av_cols = document.getElementById(&#39;available_columns&#39;);<br />
	var sl_cols = document.getElementById(&#39;selected_columns&#39;);<br />
	var sl_length = sl_cols.options.length;<br />
	//empty selected item box<br />
	//sl_cols.options.length = 0;</p>
<p>	for (var i = 0; i &lt; av_cols.options.length; i  ){<br />
            sl_cols.options[i sl_length] = new Option(av_cols.options[i].text, av_cols.options[i].value);<br />
        }</p>
<p>	for (var i = 0; i &lt; av_cols.options.length; i  )<br />
            {<br />
		sl_cols.options[i sl_length] = new Option(av_cols.options[i].text, av_cols.options[i].value,av_cols.options[i].selected = true);<br />
//                av_cols.options[i].value.select();<br />
            }</p>
<p>	//empty available item box<br />
	av_cols.options.length = 0;</p>
<p>}</p>
<p>//moving all items<br />
function moveLeftAll(){</p>
<p>	var av_cols = document.getElementById(&#39;available_columns&#39;);<br />
	var sl_cols = document.getElementById(&#39;selected_columns&#39;);<br />
	var av_length = av_cols.options.length;<br />
	//empty available item box<br />
	//av_cols.options.length = 0;</p>
<p>	for (var i = 0; i &lt; sl_cols.options.length; i  )<br />
		av_cols.options[i av_length] = new Option(sl_cols.options[i].text, sl_cols.options[i].value);</p>
<p>	//empty selected item box<br />
	sl_cols.options.length = 0;</p>
<p>}</p>
<p>//moving items to the right<br />
function moveRight(){<br />
 	var av_cols = document.getElementById(&#39;available_columns&#39;);<br />
	var sl_cols = document.getElementById(&#39;selected_columns&#39;);</p>
<p>	swapItems(av_cols, sl_cols);</p>
<p>}</p>
<p>function moveLeft(){<br />
	var av_cols = document.getElementById(&#39;available_columns&#39;);<br />
	var sl_cols = document.getElementById(&#39;selected_columns&#39;);</p>
<p>	swapItems(sl_cols, av_cols);</p>
<p>}</p>
<p>function swapItems(boxFrom, boxTo){<br />
	var countBoxTo = boxTo.options.length;</p>
<p>	for (var i = 0; i &lt; boxFrom.options.length; i  ){<br />
		if (boxFrom.options[i].selected) {<br />
			boxTo.options[countBoxTo  ] = new Option(boxFrom.options[i].text, boxFrom.options[i].value);<br />
 			removeItem(boxFrom, i);<br />
			i&#8211;;<br />
		}<br />
	}<br />
}</p>
<p>function removeItem(listBox, optionIndex){<br />
   listBox.remove(optionIndex);</p>
<p>}</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nimesha1984.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nimesha1984.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nimesha1984.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nimesha1984.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nimesha1984.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nimesha1984.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nimesha1984.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nimesha1984.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nimesha1984.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nimesha1984.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nimesha1984.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nimesha1984.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nimesha1984.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nimesha1984.wordpress.com/124/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nimesha1984.wordpress.com&amp;blog=10268184&amp;post=124&amp;subd=nimesha1984&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nimesha1984.wordpress.com/2009/11/13/move-options-in-a-combo-to-another-combo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/215439848960dae361013134954fdc7a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nimesha</media:title>
		</media:content>

		<media:content url="http://nimesha1984.files.wordpress.com/2009/11/combo.jpg" medium="image">
			<media:title type="html">combo</media:title>
		</media:content>
	</item>
		<item>
		<title>How to post CODE samples in a Blog</title>
		<link>http://nimesha1984.wordpress.com/2009/11/12/how-to-post-code-samples-in-a-blog/</link>
		<comments>http://nimesha1984.wordpress.com/2009/11/12/how-to-post-code-samples-in-a-blog/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 04:37:22 +0000</pubDate>
		<dc:creator>nimesha</dc:creator>
				<category><![CDATA[miscellaneous]]></category>

		<guid isPermaLink="false">http://nimesha1984.wordpress.com/?p=119</guid>
		<description><![CDATA[I had aproblem of posting codes in a blog.Because it will display the out put for the HTML and other code samples were changed. Therefore I got used to post code samples as images at the beginning.But the visitor is uncomfortable to copy the code samples when I post it as an image. But after [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nimesha1984.wordpress.com&amp;blog=10268184&amp;post=119&amp;subd=nimesha1984&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I had  aproblem of posting codes in a blog.Because it will display the out put for the HTML and other code samples were changed. Therefore I got used to post code samples as images at the beginning.But the visitor is uncomfortable to copy the code samples when I post it as an image.</p>
<p>But after thats I found a site where codes can be changed to a post friendly manner.</p>
<p><strong><a href="http://www.elliotswan.com/postable/">http://www.elliotswan.com/postable/</a></strong></p>
<p>This is an online tool and it it easy for me to post code samples in the blog.</p>
<p>We just have to copy and paste the code here, it will convert the code  into a postable style.This is the online tool I use&#8230;. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nimesha1984.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nimesha1984.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nimesha1984.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nimesha1984.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nimesha1984.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nimesha1984.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nimesha1984.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nimesha1984.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nimesha1984.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nimesha1984.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nimesha1984.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nimesha1984.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nimesha1984.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nimesha1984.wordpress.com/119/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nimesha1984.wordpress.com&amp;blog=10268184&amp;post=119&amp;subd=nimesha1984&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nimesha1984.wordpress.com/2009/11/12/how-to-post-code-samples-in-a-blog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/215439848960dae361013134954fdc7a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nimesha</media:title>
		</media:content>
	</item>
		<item>
		<title>PHP Pagination</title>
		<link>http://nimesha1984.wordpress.com/2009/11/11/php-pagination/</link>
		<comments>http://nimesha1984.wordpress.com/2009/11/11/php-pagination/#comments</comments>
		<pubDate>Wed, 11 Nov 2009 10:46:47 +0000</pubDate>
		<dc:creator>nimesha</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://nimesha1984.wordpress.com/?p=89</guid>
		<description><![CDATA[If there are lot of rows are available to display in a web page,we can use pagination to display rows as parts. The following is an example of php pagination. This is the database table was used to get data. This is the output after executing the code&#8230;.. &#60;!&#8211;insert HTML&#8211;&#62; &#60;?php echo &#39; &#60;HTML&#62; &#60;head&#62; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nimesha1984.wordpress.com&amp;blog=10268184&amp;post=89&amp;subd=nimesha1984&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img src="http://nimesha1984.files.wordpress.com/2009/11/pgination.jpg?w=470&#038;h=190" alt="pgination" title="pgination" width="470" height="190" class="alignleft size-full wp-image-98" /></p>
<p>If there are lot of rows are available to display in a web page,we can use pagination to display rows as parts.</p>
<p>The following is an example of php pagination.</p>
<p>This is the database table was used to get data.<br />
<img class="alignleft size-full wp-image-92" title="database" src="http://nimesha1984.files.wordpress.com/2009/11/database2.jpg?w=470&#038;h=354" alt="database" width="470" height="354" /></p>
<p>This is the output after executing the code&#8230;..</p>
<p>&lt;!&#8211;insert HTML&#8211;&gt;<br />
&lt;?php echo &#39;<br />
&lt;HTML&gt;</p>
<p>&lt;head&gt;<br />
&lt;style type=&quot;text/css&quot;&gt;</p>
<p>div.pagination {<br />
	padding: 3px;<br />
	margin: 3px;<br />
}</p>
<p>div.pagination a {<br />
	padding: 2px 5px 2px 5px;<br />
	margin: 2px;<br />
	border: 1px solid #AAAADD;</p>
<p>	text-decoration: none; /* no underline */<br />
	color: #000099;<br />
}<br />
div.pagination a:hover, div.pagination a:active {<br />
	border: 1px solid #000099;</p>
<p>	color: #000;<br />
}<br />
div.pagination span.current {<br />
	padding: 2px 5px 2px 5px;<br />
	margin: 2px;<br />
		border: 1px solid #000099;</p>
<p>		font-weight: bold;<br />
		background-color: #000099;<br />
		color: #FFF;<br />
	}<br />
	div.pagination span.disabled {<br />
		padding: 3px 7px 3px 7px;<br />
		margin: 2px;<br />
		border: 1px solid #EEE;</p>
<p>		color: #DDD;<br />
	}</p>
<p>&lt;/style&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
    &lt;b&gt;&lt;p align=&quot;center&quot;&gt;Pagination in PHP&lt;/p&gt;&lt;/b&gt;&lt;br&gt;<br />
        &lt;table align=&quot;center&quot; border=&quot;1&quot;&gt;<br />
            &lt;th&gt;SESSION ID &lt;/th&gt;<br />
            &lt;th&gt;DATE CREATED&lt;/th&gt;&#39;</p>
<p>; ?&gt;</p>
<p>&lt;?php<br />
        //connect to the database<br />
	$db=mysql_connect(&#39;localhost&#39;,&#39;root&#39;,&#39;&#39;) or die(mysql_error());<br />
        mysql_select_db(&#39;LMS&#39;); 	</p>
<p>        //give the table name here<br />
	$tbl_name=&quot;sessions&quot;;</p>
<p>	// How many adjacent pages should be shown on each side?<br />
	$adjacents = 3;</p>
<p>	/*<br />
	   First get total number of rows in data table.<br />
	   If you have a WHERE clause in your query, make sure you mirror it here.<br />
	*/<br />
	$query = &quot;SELECT COUNT(*) as num FROM $tbl_name&quot;;<br />
	$total_pages = mysql_fetch_array(mysql_query($query));<br />
	$total_pages = $total_pages[&#39;num&#39;];</p>
<p>	//I will load data in the same page..Therefore I have given the same name<br />
	$targetpage = &quot;pagination.php&quot;;<br />
	//how many items to show per page.. I will show 5 rows<br />
        $limit = 5;</p>
<p>	$page = &quot;&quot;;<br />
        $page = $_GET[&#39;page&#39;];<br />
	if($page)<br />
		$start = ($page &#8211; 1) * $limit; 			//first item to display on this page<br />
	else<br />
		$start = 0;								//if no page var is given, set start to 0</p>
<p>	/* Get data. */<br />
	$sql = &quot;SELECT * FROM $tbl_name LIMIT $start, $limit&quot;;<br />
	$result = mysql_query($sql);</p>
<p>	while($row = mysql_fetch_array($result))<br />
	{<br />
            echo &#39;&lt;tr&gt;&#39;;<br />
            echo &#39;&lt;td&gt;&#39;.$row[&#39;SESSION_ID&#39;].&#39;&lt;/td&gt;&#39;;<br />
            echo &#39;&lt;td&gt;&#39;.$row[&#39;DATE_CREATED&#39;].&#39;&lt;/td&gt;&#39;;<br />
            echo &#39;&lt;/tr&gt;&#39;;<br />
	}</p>
<p>	/* Setup page vars for display. */<br />
	if ($page == 0) $page = 1;					//if no page var is given, default to 1.<br />
	$prev = $page &#8211; 1;							//previous page is page &#8211; 1<br />
	$next = $page   1;							//next page is page   1<br />
	$lastpage = ceil($total_pages/$limit);		//lastpage is = total pages / items per page, rounded up.<br />
	$lpm1 = $lastpage &#8211; 1;						//last page minus 1</p>
<p>	/*<br />
		Now we apply our rules and draw the pagination object.<br />
		We&#39;re actually saving the code to a variable in case we want to draw it more than once.<br />
	*/<br />
	$pagination = &quot;&quot;;<br />
	if($lastpage &gt; 1)<br />
	{<br />
		$pagination .= &quot;&lt;div class=\&quot;pagination\&quot;&gt;&quot;;<br />
		//previous button<br />
		if ($page &gt; 1)<br />
			$pagination.= &quot;&lt;a href=\&quot;$targetpage?page=$prev\&quot;&gt;&laquo; previous&lt;/a&gt;&quot;;<br />
		else<br />
			$pagination.= &quot;&lt;span class=\&quot;disabled\&quot;&gt;&laquo; previous&lt;/span&gt;&quot;;</p>
<p>		//pages<br />
		if ($lastpage &lt; 7   ($adjacents * 2))	//not enough pages to bother breaking it up<br />
		{<br />
			for ($counter = 1; $counter &lt;= $lastpage; $counter  )<br />
			{<br />
				if ($counter == $page)<br />
					$pagination.= &quot;&lt;span class=\&quot;current\&quot;&gt;$counter&lt;/span&gt;&quot;;<br />
				else<br />
					$pagination.= &quot;&lt;a href=\&quot;$targetpage?page=$counter\&quot;&gt;$counter&lt;/a&gt;&quot;;<br />
			}<br />
		}<br />
		elseif($lastpage &gt; 5   ($adjacents * 2))	//enough pages to hide some<br />
		{<br />
			//close to beginning; only hide later pages<br />
			if($page &lt; 1   ($adjacents * 2))<br />
			{<br />
				for ($counter = 1; $counter &lt; 4   ($adjacents * 2); $counter  )<br />
				{<br />
					if ($counter == $page)<br />
						$pagination.= &quot;&lt;span class=\&quot;current\&quot;&gt;$counter&lt;/span&gt;&quot;;<br />
					else<br />
						$pagination.= &quot;&lt;a href=\&quot;$targetpage?page=$counter\&quot;&gt;$counter&lt;/a&gt;&quot;;<br />
				}<br />
				$pagination.= &quot;&#8230;&quot;;<br />
				$pagination.= &quot;&lt;a href=\&quot;$targetpage?page=$lpm1\&quot;&gt;$lpm1&lt;/a&gt;&quot;;<br />
				$pagination.= &quot;&lt;a href=\&quot;$targetpage?page=$lastpage\&quot;&gt;$lastpage&lt;/a&gt;&quot;;<br />
			}<br />
			//in middle; hide some front and some back<br />
			elseif($lastpage &#8211; ($adjacents * 2) &gt; $page &amp;&amp; $page &gt; ($adjacents * 2))<br />
			{<br />
				$pagination.= &quot;&lt;a href=\&quot;$targetpage?page=1\&quot;&gt;1&lt;/a&gt;&quot;;<br />
				$pagination.= &quot;&lt;a href=\&quot;$targetpage?page=2\&quot;&gt;2&lt;/a&gt;&quot;;<br />
				$pagination.= &quot;&#8230;&quot;;<br />
				for ($counter = $page &#8211; $adjacents; $counter &lt;= $page   $adjacents; $counter  )<br />
				{<br />
					if ($counter == $page)<br />
						$pagination.= &quot;&lt;span class=\&quot;current\&quot;&gt;$counter&lt;/span&gt;&quot;;<br />
					else<br />
						$pagination.= &quot;&lt;a href=\&quot;$targetpage?page=$counter\&quot;&gt;$counter&lt;/a&gt;&quot;;<br />
				}<br />
				$pagination.= &quot;&#8230;&quot;;<br />
				$pagination.= &quot;&lt;a href=\&quot;$targetpage?page=$lpm1\&quot;&gt;$lpm1&lt;/a&gt;&quot;;<br />
				$pagination.= &quot;&lt;a href=\&quot;$targetpage?page=$lastpage\&quot;&gt;$lastpage&lt;/a&gt;&quot;;<br />
			}<br />
			//close to end; only hide early pages<br />
			else<br />
			{<br />
				$pagination.= &quot;&lt;a href=\&quot;$targetpage?page=1\&quot;&gt;1&lt;/a&gt;&quot;;<br />
				$pagination.= &quot;&lt;a href=\&quot;$targetpage?page=2\&quot;&gt;2&lt;/a&gt;&quot;;<br />
				$pagination.= &quot;&#8230;&quot;;<br />
				for ($counter = $lastpage &#8211; (2   ($adjacents * 2)); $counter &lt;= $lastpage; $counter  )<br />
				{<br />
					if ($counter == $page)<br />
						$pagination.= &quot;&lt;span class=\&quot;current\&quot;&gt;$counter&lt;/span&gt;&quot;;<br />
					else<br />
						$pagination.= &quot;&lt;a href=\&quot;$targetpage?page=$counter\&quot;&gt;$counter&lt;/a&gt;&quot;;<br />
				}<br />
			}<br />
		}</p>
<p>		//next button<br />
		if ($page &lt; $counter &#8211; 1)<br />
			$pagination.= &quot;&lt;a href=\&quot;$targetpage?page=$next\&quot;&gt;next &raquo;&lt;/a&gt;&quot;;<br />
		else<br />
			$pagination.= &quot;&lt;span class=\&quot;disabled\&quot;&gt;next &raquo;&lt;/span&gt;&quot;;<br />
		$pagination.= &quot;&lt;/div&gt;\n&quot;;<br />
	}<br />
?&gt;</p>
<p>&lt;?php  echo &#39;&lt;/table&gt;&lt;br&gt;&#39;; ?&gt;</p>
<p>&lt;?php  echo $pagination. &#39;&lt;/body&gt;&lt;/HTML&gt;&#39;; ?&gt;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nimesha1984.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nimesha1984.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nimesha1984.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nimesha1984.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nimesha1984.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nimesha1984.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nimesha1984.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nimesha1984.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nimesha1984.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nimesha1984.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nimesha1984.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nimesha1984.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nimesha1984.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nimesha1984.wordpress.com/89/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nimesha1984.wordpress.com&amp;blog=10268184&amp;post=89&amp;subd=nimesha1984&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nimesha1984.wordpress.com/2009/11/11/php-pagination/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/215439848960dae361013134954fdc7a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nimesha</media:title>
		</media:content>

		<media:content url="http://nimesha1984.files.wordpress.com/2009/11/pgination.jpg" medium="image">
			<media:title type="html">pgination</media:title>
		</media:content>

		<media:content url="http://nimesha1984.files.wordpress.com/2009/11/database2.jpg" medium="image">
			<media:title type="html">database</media:title>
		</media:content>
	</item>
		<item>
		<title>Image Upload</title>
		<link>http://nimesha1984.wordpress.com/2009/11/06/image-upload-2/</link>
		<comments>http://nimesha1984.wordpress.com/2009/11/06/image-upload-2/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 05:39:49 +0000</pubDate>
		<dc:creator>nimesha</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://nimesha1984.wordpress.com/?p=10</guid>
		<description><![CDATA[This is a simple way to upload pictures using PHP.While uploading the images can be resized. &#60;?php error_reporting(0); $change=&#34;&#34;; //set the maximum size of the images can be uploaded define (&#34;MAX_SIZE&#34;,&#34;400&#34;); function getExtension($str) { $i = strrpos($str,&#34;.&#34;); if (!$i) { return &#34;&#34;; } $l = strlen($str) &#8211; $i; $ext = substr($str,$i 1,$l); return $ext; } [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nimesha1984.wordpress.com&amp;blog=10268184&amp;post=10&amp;subd=nimesha1984&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://nimesha1984.files.wordpress.com/2009/10/upload.jpg"><img src="http://nimesha1984.files.wordpress.com/2009/10/upload.jpg?w=247" border="0" alt="" /></a><br />
This is a simple way to upload pictures using PHP.While uploading the images can be resized.</p>
<p>&lt;?php<br />
error_reporting(0);</p>
<p>$change=&quot;&quot;;</p>
<p>//set the maximum size of the images can be uploaded<br />
define (&quot;MAX_SIZE&quot;,&quot;400&quot;);<br />
function getExtension($str)<br />
{<br />
    $i = strrpos($str,&quot;.&quot;);<br />
    if (!$i)<br />
    {<br />
        return &quot;&quot;;<br />
    }<br />
    $l = strlen($str) &#8211; $i;<br />
    $ext = substr($str,$i 1,$l);<br />
    return $ext;<br />
}</p>
<p>$errors=0;<br />
if($_SERVER[&quot;REQUEST_METHOD&quot;] == &quot;POST&quot;)<br />
{<br />
    $image =$_FILES[&quot;file&quot;][&quot;name&quot;];<br />
    $uploadedfile = $_FILES[&#39;file&#39;][&#39;tmp_name&#39;];</p>
<p>    if ($image)<br />
    {<br />
        $filename = stripslashes($_FILES[&#39;file&#39;][&#39;name&#39;]);<br />
        $extension = getExtension($filename);<br />
        $extension = strtolower($extension);<br />
		//set the file types which are acceptable<br />
        if (($extension != &quot;jpg&quot;) &amp;&amp; ($extension != &quot;jpeg&quot;) &amp;&amp; ($extension != &quot;png&quot;) &amp;&amp; ($extension != &quot;gif&quot;)&amp;&amp; ($extension != &quot;bmp&quot;)&amp;&amp; ($extension != &quot;TIFF&quot;))<br />
        {<br />
            $change=&#39;Unknown Image Extension&#39;;<br />
            $errors=1;<br />
        }<br />
        else<br />
        {<br />
            $size=filesize($_FILES[&#39;file&#39;][&#39;tmp_name&#39;]);<br />
            if ($size &gt; MAX_SIZE*1024)<br />
            {<br />
                $change=&#39;You have exceeded the size limit!&#39;;<br />
                $errors=1;<br />
            }<br />
            else<br />
            {</p>
<p>                if($extension==&quot;jpg&quot; || $extension==&quot;jpeg&quot; )<br />
                {<br />
                    $uploadedfile = $_FILES[&#39;file&#39;][&#39;tmp_name&#39;];<br />
                    $src = imagecreatefromjpeg($uploadedfile);</p>
<p>                }<br />
                else if($extension==&quot;png&quot;)<br />
                {<br />
                    $uploadedfile = $_FILES[&#39;file&#39;][&#39;tmp_name&#39;];<br />
                    $src = imagecreatefrompng($uploadedfile);<br />
                }<br />
                else<br />
                {<br />
                    $src = imagecreatefromgif($uploadedfile);<br />
                }</p>
<p>                echo $scr;<br />
                list($width,$height)=getimagesize($uploadedfile);</p>
<p>		    //set the file size according to your choice<br />
                $newwidth=100;<br />
                $newheight= 80;<br />
                $tmp=imagecreatetruecolor($newwidth,$newheight);</p>
<p>                //the original image<br />
                $originalWidth=$width;<br />
                $newheight1=$height;<br />
                $tmp1=imagecreatetruecolor($originalWidth,$newheight1);</p>
<p>                imagecopyresampled($tmp,$src,0,0,0,0,$newwidth,$newheight,$width,$height);<br />
                imagecopyresampled($tmp1,$src,0,0,0,0,$originalWidth,$originalHeight1,$width,$height);</p>
<p>				//set the name of the file<br />
                $filename = &quot;small_&quot;. $_FILES[&#39;file&#39;][&#39;name&#39;];<br />
                $filename1 = $_FILES[&#39;file&#39;][&#39;name&#39;];</p>
<p>                imagejpeg($tmp,$filename,100);<br />
                imagejpeg($tmp1,$filename1,100);</p>
<p>                imagedestroy($src);<br />
                imagedestroy($tmp);<br />
                imagedestroy($tmp1);<br />
            }<br />
        }<br />
    }<br />
}</p>
<p>//If no errors registred, print the success<br />
if(isset($_POST[&#39;Submit&#39;]) &amp;&amp; !$errors)<br />
{<br />
    $change=&#39;Image Uploaded Successfully!&#39;;<br />
}</p>
<p>?&gt;</p>
<p><strong>HTML Code</strong></p>
<p>&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;title&gt;Picture Upload&lt;/title&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;</p>
<p>    &lt;table border=&quot;0&quot; cellspacing=&quot;3&quot; cellpadding=&quot;15&quot; align=&quot;center&quot;&gt;<br />
        &lt;tbody&gt;<br />
        &lt;form method=&quot;post&quot; action=&quot;&quot; enctype=&quot;multipart/form-data&quot; name=&quot;form&quot;&gt;<br />
            &lt;tr&gt;<br />
                &lt;td&gt;&lt;?php echo $change; ?&gt; &lt;/td&gt;<br />
            &lt;/tr&gt;<br />
            &lt;tr&gt;<br />
                &lt;td&gt;&lt;img src=&quot;&lt;?php echo $filename; ?&gt;&quot; /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/td&gt;<br />
            &lt;/tr&gt;<br />
            &lt;tr&gt;<br />
                &lt;td&gt; &lt;input size=&quot;25&quot; name=&quot;file&quot; type=&quot;file&quot; /&gt;&lt;/td&gt;<br />
            &lt;/tr&gt;</p>
<p>            &lt;tr&gt;<br />
                &lt;td&gt;Image maximum size&amp;nbsp;&amp;nbsp;&lt;b&gt;400 &lt;/b&gt;&amp;nbsp;&amp;nbsp;kb&lt;/td&gt;<br />
            &lt;/tr&gt;<br />
            &lt;tr&gt;<br />
                &lt;td&gt;&lt;input type=&quot;submit&quot; value=&quot;Upload&quot; name=&quot;Submit&quot;/&gt;&lt;/td&gt;<br />
            &lt;/tr&gt;<br />
        &lt;/tbody&gt;<br />
        &lt;/form&gt;<br />
    &lt;/table&gt;</p>
<p>&lt;/body&gt;<br />
&lt;/html&gt;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nimesha1984.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nimesha1984.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nimesha1984.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nimesha1984.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nimesha1984.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nimesha1984.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nimesha1984.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nimesha1984.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nimesha1984.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nimesha1984.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nimesha1984.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nimesha1984.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nimesha1984.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nimesha1984.wordpress.com/10/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nimesha1984.wordpress.com&amp;blog=10268184&amp;post=10&amp;subd=nimesha1984&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nimesha1984.wordpress.com/2009/11/06/image-upload-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/215439848960dae361013134954fdc7a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nimesha</media:title>
		</media:content>

		<media:content url="http://nimesha1984.files.wordpress.com/2009/10/upload.jpg?w=247" medium="image" />
	</item>
		<item>
		<title>Prevent SQL Injection Attack in PHP</title>
		<link>http://nimesha1984.wordpress.com/2009/10/27/prevent-sql-injection-attack-in-php/</link>
		<comments>http://nimesha1984.wordpress.com/2009/10/27/prevent-sql-injection-attack-in-php/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 08:14:00 +0000</pubDate>
		<dc:creator>nimesha</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://nimesha1984.wordpress.com/2009/10/27/prevent-sql-injection-attack-in-php</guid>
		<description><![CDATA[MYsql injection takes place when a visitor to website enters values into a form.Tha is a form input by a visitor (Fill a form). A Login form can be taken as an example.Someone can enter a query inside our query and can change the code.Therefore when we do programming like form inputs , we should [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nimesha1984.wordpress.com&amp;blog=10268184&amp;post=22&amp;subd=nimesha1984&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>MYsql injection takes place when a visitor to  website enters values into a form.Tha is a form input by a visitor (Fill a form).</p>
<p>A Login form can be taken as an example.Someone can enter a query inside our query and can change the code.Therefore when we do programming like form inputs , we should be aware of this mysql injection attacks.And we should use some tricks to protect our sites against sql injection.</p>
<p>PHP has a way of avoiding sql injection attacks.That is mysql_real_escape_string()<br />We can use variable assined values with this rather using values directly&#8230;</p>
<p>Normally values can be assigned directly as follows..<br />$sql = &#8220;SELECT COUNT(*) FROM USER WHERE USERNAME = $this-&gt;userName&#8221;;</p>
<p>We can use the following query to avoid this issue&#8230;<br />$sql = sprintf(&#8220;SELECT COUNT(*) FROM USER WHERE USERNAME = &#8216;%s&#8217;&#8221;, mysql_escape_string($this-&gt;userName));</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nimesha1984.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nimesha1984.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nimesha1984.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nimesha1984.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nimesha1984.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nimesha1984.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nimesha1984.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nimesha1984.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nimesha1984.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nimesha1984.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nimesha1984.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nimesha1984.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nimesha1984.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nimesha1984.wordpress.com/22/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nimesha1984.wordpress.com&amp;blog=10268184&amp;post=22&amp;subd=nimesha1984&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nimesha1984.wordpress.com/2009/10/27/prevent-sql-injection-attack-in-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/215439848960dae361013134954fdc7a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nimesha</media:title>
		</media:content>
	</item>
		<item>
		<title>Hmmm&#8230;Its life&#8230; :)</title>
		<link>http://nimesha1984.wordpress.com/2009/10/17/hmmm-its-life/</link>
		<comments>http://nimesha1984.wordpress.com/2009/10/17/hmmm-its-life/#comments</comments>
		<pubDate>Sat, 17 Oct 2009 04:39:00 +0000</pubDate>
		<dc:creator>nimesha</dc:creator>
				<category><![CDATA[Entertainment]]></category>

		<guid isPermaLink="false">http://nimesha1984.wordpress.com/2009/10/17/hmmm-its-life</guid>
		<description><![CDATA[In the weekend Im free&#8230;nothing is done with technical stuff like programming&#8230; Just spending time with music..smile..going temple&#8230;.and try to be happy and relax as much as I can&#8230;yes today I am blogging just what I feel&#8230; yes&#8230; I never worry for the past..PAST is PAST..Yeah&#8230;Thats the theory I follow&#8230;Hmmmmmm&#8230;.. Sometimes we were supposed to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nimesha1984.wordpress.com&amp;blog=10268184&amp;post=21&amp;subd=nimesha1984&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p> In the weekend Im free&#8230;nothing is done  with technical stuff like programming&#8230; Just spending time with music..smile..going temple&#8230;.and try to be happy and relax as much as I can&#8230;yes today I am blogging just what I feel&#8230; <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>yes&#8230; I never worry for the past..PAST is PAST..Yeah&#8230;Thats the theory I follow&#8230;Hmmmmmm&#8230;.. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  </p>
<p>Sometimes we were supposed to meet the wrong things before meeting the right one. so that, when we finally meet the right thing, we will know how to be grateful for that gift&#8230; <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><span style="font-weight:bold;">No one is perfect..</span>I also have some sad events in my life..yes..that should be..life is not a bed of roses,no..hih hih&#8230; But I dont go behind those things&#8230;We need little bit of time to forget PAST..yes..thats the truth..we do mistakes in our lives.But no point of worrying for that Past and wasting time..Just live today and welcome the future&#8230;.This is what I try to do in my life..  <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>yes I believe on my Destiny&#8230;we will have everything according to our destiny&#8230;I never tell that we should believe on destiny and not to be courageous&#8230;This is applicable somethings like love or life&#8230;Sometimes we cant have the person we love&#8230;But sometimes we can..Thats the destiny&#8230;Here we can do nothing&#8230;Thats the place we cant go beyond the destiny&#8230;.Yes..  <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Yeah..I live with a smile all the time..I am very happy with my family(father/mother/sister) and my friends&#8230;.Yeah..This is my life&#8230;.Love you all&#8230;. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Yeah&#8230;.<span style="font-weight:bold;">PAST is PAST&#8230;&#8230;..Be happy&#8230;&#8230;.Smile pleeeeeeeeeeeease&#8230;&#8230;&#8230;.. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nimesha1984.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nimesha1984.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nimesha1984.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nimesha1984.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nimesha1984.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nimesha1984.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nimesha1984.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nimesha1984.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nimesha1984.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nimesha1984.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nimesha1984.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nimesha1984.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nimesha1984.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nimesha1984.wordpress.com/21/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nimesha1984.wordpress.com&amp;blog=10268184&amp;post=21&amp;subd=nimesha1984&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nimesha1984.wordpress.com/2009/10/17/hmmm-its-life/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/215439848960dae361013134954fdc7a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nimesha</media:title>
		</media:content>
	</item>
		<item>
		<title>Dreamweaver Vs NetBeans for PHP &#8211; Part 1</title>
		<link>http://nimesha1984.wordpress.com/2009/10/15/dreamweaver-vs-netbeans-for-php-part-1/</link>
		<comments>http://nimesha1984.wordpress.com/2009/10/15/dreamweaver-vs-netbeans-for-php-part-1/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 11:52:00 +0000</pubDate>
		<dc:creator>nimesha</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://nimesha1984.wordpress.com/2009/10/15/dreamweaver-vs-netbeans-for-php-part-1</guid>
		<description><![CDATA[I started web developing with dreamweaver. It was easy for me to deal with code while shifting to the design.&#8217;Split&#8217; mode helps to view both code and the design at the same time.Therefore it is very easy to do web developing with dreamweaver when we deal with both design and the programming. Today I satrted [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nimesha1984.wordpress.com&amp;blog=10268184&amp;post=20&amp;subd=nimesha1984&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://nimesha1984.files.wordpress.com/2009/10/dw.jpg"><img src="http://nimesha1984.files.wordpress.com/2009/10/dw.jpg?w=300" border="0" /></a><br />I started web developing with dreamweaver. It was easy for me to deal with code while shifting to the design.&#8217;Split&#8217; mode helps to view both code and the design at the same time.Therefore it is very easy to do web developing with dreamweaver when we deal with both design and the programming.</p>
<p><a href="http://nimesha1984.files.wordpress.com/2009/10/net.jpg"><img src="http://nimesha1984.files.wordpress.com/2009/10/net.jpg?w=300" border="0" /></a><br />Today I satrted web developing with Netbeans.Wow.Netbeans is very easy to use with software developing specially with OOP.When we dont have to deal with the design very much, we can use NetBeans.If we are doing OOP(Object Oriented programming), the objects will be displayed in a panel.Therefore the objects can be identified very easily than dreamwaver.</p>
<p><a href="http://nimesha1984.files.wordpress.com/2009/10/compile.jpg"><img src="http://nimesha1984.files.wordpress.com/2009/10/compile.jpg?w=300" border="0" /></a><br />We can select the compiler as we want as shown in the above screenshot.If we need the browser we can set it.Otherwise we can just use a commandline complier for debugging.</p>
<p><a href="http://nimesha1984.files.wordpress.com/2009/10/err.jpg"><img src="http://nimesha1984.files.wordpress.com/2009/10/err.jpg?w=300" border="0" /></a><br />Another advantage of NetBeans is , while we are coding we can see the sintax errors (eg: missing Braces) as shown in the figure below.</p>
<p>But my conclusion is that dreamweaver and NetBeans has different types of advantages.The things that can be done by dreamweaver canot be done in with NetBeans and vise versa.Therefore both are very useful tools for web developing.</p>
<p>I hope to tell about the difference between those two further while having experience with netbeans&#8230; <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nimesha1984.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nimesha1984.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nimesha1984.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nimesha1984.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nimesha1984.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nimesha1984.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nimesha1984.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nimesha1984.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nimesha1984.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nimesha1984.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nimesha1984.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nimesha1984.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nimesha1984.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nimesha1984.wordpress.com/20/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nimesha1984.wordpress.com&amp;blog=10268184&amp;post=20&amp;subd=nimesha1984&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nimesha1984.wordpress.com/2009/10/15/dreamweaver-vs-netbeans-for-php-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/215439848960dae361013134954fdc7a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nimesha</media:title>
		</media:content>

		<media:content url="http://nimesha1984.files.wordpress.com/2009/10/dw.jpg?w=300" medium="image" />

		<media:content url="http://nimesha1984.files.wordpress.com/2009/10/net.jpg?w=300" medium="image" />

		<media:content url="http://nimesha1984.files.wordpress.com/2009/10/compile.jpg?w=300" medium="image" />

		<media:content url="http://nimesha1984.files.wordpress.com/2009/10/err.jpg?w=300" medium="image" />
	</item>
	</channel>
</rss>
