<?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>Mahfuz's Weblog</title>
	<atom:link href="http://mahfuz05.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://mahfuz05.wordpress.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Thu, 29 Dec 2011 18:50:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='mahfuz05.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Mahfuz's Weblog</title>
		<link>http://mahfuz05.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://mahfuz05.wordpress.com/osd.xml" title="Mahfuz&#039;s Weblog" />
	<atom:link rel='hub' href='http://mahfuz05.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Javascript millisecond counter</title>
		<link>http://mahfuz05.wordpress.com/2011/12/29/javascript-millisecond-counter/</link>
		<comments>http://mahfuz05.wordpress.com/2011/12/29/javascript-millisecond-counter/#comments</comments>
		<pubDate>Thu, 29 Dec 2011 18:50:26 +0000</pubDate>
		<dc:creator>mahfuz05</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[counter]]></category>
		<category><![CDATA[milisecond]]></category>

		<guid isPermaLink="false">http://mahfuz05.wordpress.com/?p=58</guid>
		<description><![CDATA[we can create a javascript counter easily using serInterval() function. here is an example of it html for counter start and stop and the javascript part is<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mahfuz05.wordpress.com&amp;blog=2025347&amp;post=58&amp;subd=mahfuz05&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>we can create a javascript counter easily using serInterval() function.<br />
here is an example of it</p>
<p>html for counter start and stop<br />
<pre class="brush: xml;">
&lt;button onclick=&quot;startCounter()&quot;&gt;Start &lt;/button&gt;
&lt;button onclick=&quot;stopCounter()&quot;&gt;End &lt;/button&gt;
&lt;div class=&quot;Timer&quot;&gt;&lt;/div&gt;
</pre></p>
<p>and the javascript part is<br />
<pre class="brush: jscript;">
var intervalId; 
//setInterval function return a value . by passing this value we can stop it.
    function startCounter(){
        var start = new Date;

       intr = setInterval(function() {
            $('.Timer').text(((new Date - start) / 1000).toFixed(1) + &quot; Seconds&quot;);
        }, 100);
     //this will update in 100 millisecond later 
    }
    
    function stopCounter(){
        clearInterval(intr);

    }
</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mahfuz05.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mahfuz05.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mahfuz05.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mahfuz05.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mahfuz05.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mahfuz05.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mahfuz05.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mahfuz05.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mahfuz05.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mahfuz05.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mahfuz05.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mahfuz05.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mahfuz05.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mahfuz05.wordpress.com/58/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mahfuz05.wordpress.com&amp;blog=2025347&amp;post=58&amp;subd=mahfuz05&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mahfuz05.wordpress.com/2011/12/29/javascript-millisecond-counter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/083c8232199dafb6050ea5a4a92cdb7c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mahfuz05</media:title>
		</media:content>
	</item>
		<item>
		<title>Facebook New javascript SDK friend request</title>
		<link>http://mahfuz05.wordpress.com/2011/12/14/facebook-new-javascript-sdk-friend-request/</link>
		<comments>http://mahfuz05.wordpress.com/2011/12/14/facebook-new-javascript-sdk-friend-request/#comments</comments>
		<pubDate>Wed, 14 Dec 2011 21:07:52 +0000</pubDate>
		<dc:creator>mahfuz05</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://mahfuz05.wordpress.com/?p=52</guid>
		<description><![CDATA[we can send single or multi-friend request through the new javascript sdk . first we need to add javasript sdk . using this after that one friend request we can do this // here User id is the used id to whom we send request or if we want to send request through multi friend [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mahfuz05.wordpress.com&amp;blog=2025347&amp;post=52&amp;subd=mahfuz05&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>we can send single or multi-friend request through the new javascript sdk .<br />
first we need to add javasript sdk . using this</p>
<p><pre class="brush: jscript;">
 &lt;div id=&quot;fb-root&quot;&gt;&lt;/div&gt;
 &lt;script src=&quot;http://connect.facebook.net/en_US/all.js&quot;&gt;&lt;/script&gt;
</pre></p>
<p>after that one friend request we can do this<br />
<pre class="brush: jscript;">
&lt;p&gt;
      &lt;input type=&quot;button&quot;
        onclick=&quot;sendRequestToRecipients(); return false;&quot;
        value=&quot;Send Request to Users Directly&quot;
      /&gt;
      &lt;input type=&quot;text&quot; value=&quot;User ID&quot; name=&quot;user_ids&quot; /&gt;
       //here user id is whom we send request
      &lt;/p&gt;
</pre></p>
<p>// here User id is the used id to whom we send request</p>
<p>or if we want to send request through multi friend selector we need this<br />
<pre class="brush: jscript;">
&lt;p&gt;
    &lt;input type=&quot;button&quot;
      onclick=&quot;sendRequestViaMultiFriendSelector(); return false;&quot;
      value=&quot;Send Request to Many Users with MFS&quot;
    /&gt;
    &lt;/p&gt;
</pre></p>
<p>here is the javascript part</p>
<p><pre class="brush: jscript;">
FB.init({
appId : 'YOUR_APP_ID',
status : true,
cookie : true,
oauth: true
});&lt;/code&gt;

function sendRequestToRecipients() {
var user_ids = document.getElementsByName(&quot;user_ids&quot;)[0].value;
FB.ui({method: 'apprequests',
message: 'My Great Request',
to: user_ids,
}, requestCallback);
}

function sendRequestViaMultiFriendSelector() {
FB.ui({method: 'apprequests',
message: 'My Great Request'
}, requestCallback);
}

function requestCallback(response) {
// Handle callback here
}

</pre></p>
<p>if we need to filter our friend list we have to add a line in the function<br />
<pre class="brush: jscript;">
function sendRequestViaMultiFriendSelector() {
FB.ui({method: 'apprequests',
message: 'Invitation request from FBMathGame',
// filters:['app_users'] //for who use this apps
filters:['app_non_users'] //for are not using this apps
//if we use all or remove filters it will show all friends&lt;/code&gt;

}, requestCallback);
}
</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mahfuz05.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mahfuz05.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mahfuz05.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mahfuz05.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mahfuz05.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mahfuz05.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mahfuz05.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mahfuz05.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mahfuz05.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mahfuz05.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mahfuz05.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mahfuz05.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mahfuz05.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mahfuz05.wordpress.com/52/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mahfuz05.wordpress.com&amp;blog=2025347&amp;post=52&amp;subd=mahfuz05&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mahfuz05.wordpress.com/2011/12/14/facebook-new-javascript-sdk-friend-request/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/083c8232199dafb6050ea5a4a92cdb7c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mahfuz05</media:title>
		</media:content>
	</item>
		<item>
		<title>Export import big Mysql data</title>
		<link>http://mahfuz05.wordpress.com/2011/02/06/export-import-big-mysql-data/</link>
		<comments>http://mahfuz05.wordpress.com/2011/02/06/export-import-big-mysql-data/#comments</comments>
		<pubDate>Sun, 06 Feb 2011 19:31:57 +0000</pubDate>
		<dc:creator>mahfuz05</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[mysql import export max_allowed_packet packet]]></category>

		<guid isPermaLink="false">http://mahfuz05.wordpress.com/?p=38</guid>
		<description><![CDATA[today i have trying to export and import a large database. but when i used to import or export that data i got an error like Got a packet bigger than &#8216;max_allowed_packet&#8217; bytes i got this error because mysql default packet size samll. if data is gather than 1Mb we need to reset the default [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mahfuz05.wordpress.com&amp;blog=2025347&amp;post=38&amp;subd=mahfuz05&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>today i have trying to export and import a large database. but when i used to import or export that data i got an error like<br />
Got a packet bigger than &#8216;max_allowed_packet&#8217; bytes</p>
<p>i got this error because mysql default packet size samll. if data is gather than 1Mb we need to reset the default packet size. we can do this by this command</p>
<p>set max_allowed_packet=1000*1024*1024;<br />
set net_buffer_length=1000000; </p>
<p>or<br />
set GLOBAL max_allowed_packet=1000*1024*1024;<br />
set GLOBAL net_buffer_length=1000000; </p>
<p>check if it is set or not by this<br />
select @@max_allowed_packet; </p>
<p>Note that the @@ operator works in global scope when setting up a variable, while when fetching a variable, it will retrieve the session one and if it&#8217;s not found, the global one. The reason for using session vars is that they are set per client, so a mysql restart won&#8217;t be necessary. They also don&#8217;t require SUPER privileges.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mahfuz05.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mahfuz05.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mahfuz05.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mahfuz05.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mahfuz05.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mahfuz05.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mahfuz05.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mahfuz05.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mahfuz05.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mahfuz05.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mahfuz05.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mahfuz05.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mahfuz05.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mahfuz05.wordpress.com/38/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mahfuz05.wordpress.com&amp;blog=2025347&amp;post=38&amp;subd=mahfuz05&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mahfuz05.wordpress.com/2011/02/06/export-import-big-mysql-data/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/083c8232199dafb6050ea5a4a92cdb7c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mahfuz05</media:title>
		</media:content>
	</item>
		<item>
		<title>My new Job</title>
		<link>http://mahfuz05.wordpress.com/2010/06/04/my-new-job/</link>
		<comments>http://mahfuz05.wordpress.com/2010/06/04/my-new-job/#comments</comments>
		<pubDate>Fri, 04 Jun 2010 05:42:34 +0000</pubDate>
		<dc:creator>mahfuz05</dc:creator>
				<category><![CDATA[my life]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://mahfuz05.wordpress.com/?p=47</guid>
		<description><![CDATA[guys recently i joined at prolog inc . its a us based company. i worked here as software developer. it very good company to work.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mahfuz05.wordpress.com&amp;blog=2025347&amp;post=47&amp;subd=mahfuz05&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>guys recently i joined at prolog inc . its a us based company. i worked here as software developer. it very good company to work.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mahfuz05.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mahfuz05.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mahfuz05.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mahfuz05.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mahfuz05.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mahfuz05.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mahfuz05.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mahfuz05.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mahfuz05.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mahfuz05.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mahfuz05.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mahfuz05.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mahfuz05.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mahfuz05.wordpress.com/47/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mahfuz05.wordpress.com&amp;blog=2025347&amp;post=47&amp;subd=mahfuz05&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mahfuz05.wordpress.com/2010/06/04/my-new-job/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/083c8232199dafb6050ea5a4a92cdb7c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mahfuz05</media:title>
		</media:content>
	</item>
		<item>
		<title>adding days in date and difference between two days</title>
		<link>http://mahfuz05.wordpress.com/2010/06/04/adding-days-in-date-and-difference-between-two-days/</link>
		<comments>http://mahfuz05.wordpress.com/2010/06/04/adding-days-in-date-and-difference-between-two-days/#comments</comments>
		<pubDate>Fri, 04 Jun 2010 04:39:05 +0000</pubDate>
		<dc:creator>mahfuz05</dc:creator>
				<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://mahfuz05.wordpress.com/?p=42</guid>
		<description><![CDATA[we can add days in date time very easily. lets we have a date $date =&#8221;2010-06-04 12:45&#8243; . we want to add some days with it. lets the day is $days = 90; so adding day into date fast we need to convert date in millisecond. we can do this easily by a php function [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mahfuz05.wordpress.com&amp;blog=2025347&amp;post=42&amp;subd=mahfuz05&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>we can add days in date time very easily.</p>
<p>lets we have a date $date =&#8221;2010-06-04 12:45&#8243; . we want to add some days with it.</p>
<p>lets the day is $days = 90;</p>
<p>so adding day into date fast we need to convert date in millisecond. we can do this easily by a php function strtotime();</p>
<p>so we can write $date = strtotime(&#8220;2010-06-04 12:45&#8243;);</p>
<p>then we can use this function to add a date.</p>
<p>$addeddate= date(&#8220;Y-m-d H:i:s&#8221;, $date+((60*60)*24*$days));</p>
<p>it will return 2010-11-11 12:45:50 .</p>
<p>that&#8217;s it. we can difference between two days that way also.</p>
<p>there is another way but it take only y-m-d .</p>
<p>function dateDiff($dformat, $endDate, $beginDate)<br />
{<br />
$date_parts1=explode($dformat, $beginDate);<br />
$date_parts2=explode($dformat, $endDate);</p>
<p>$start_date=gregoriantojd($date_parts1[1], $date_parts1[2], $date_parts1[0]);<br />
$end_date=gregoriantojd($date_parts2[1], $date_parts2[2], $date_parts2[0]);</p>
<p>return $end_date &#8211; $start_date;<br />
}</p>
<p>$currentTime=date(&#8216;Y-m-d&#8217;);</p>
<p>$date =&#8221;2010-06-04 12:45&#8243;;</p>
<p>$end = date(&#8216;Y-m-d&#8217;, strtotime($date));</p>
<p>this will convert date in to this<br />
if date = &#8220;2010-06-04&#8243;;</p>
<p>the call the function</p>
<p>$dif=dateDiff(&#8220;-&#8221;, $end,  $currentTime);</p>
<p>if out date format is 2010/06/04 then</p>
<p>we call it this way $diff =dateDiff(&#8220;/&#8221;,$end,$currentTime);</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mahfuz05.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mahfuz05.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mahfuz05.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mahfuz05.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mahfuz05.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mahfuz05.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mahfuz05.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mahfuz05.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mahfuz05.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mahfuz05.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mahfuz05.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mahfuz05.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mahfuz05.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mahfuz05.wordpress.com/42/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mahfuz05.wordpress.com&amp;blog=2025347&amp;post=42&amp;subd=mahfuz05&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mahfuz05.wordpress.com/2010/06/04/adding-days-in-date-and-difference-between-two-days/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/083c8232199dafb6050ea5a4a92cdb7c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mahfuz05</media:title>
		</media:content>
	</item>
		<item>
		<title>Header already send problem</title>
		<link>http://mahfuz05.wordpress.com/2010/06/04/header-already-send-problem/</link>
		<comments>http://mahfuz05.wordpress.com/2010/06/04/header-already-send-problem/#comments</comments>
		<pubDate>Fri, 04 Jun 2010 04:19:35 +0000</pubDate>
		<dc:creator>mahfuz05</dc:creator>
				<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://mahfuz05.wordpress.com/?p=39</guid>
		<description><![CDATA[for php developer it is very common problem  &#8221; Header already send&#8221;. recently we have faced such a problem. there three reason for that. first one is if any space or other thing before starting &#60;?php tag . second reason is if any output occur or echo or print command before redirect. and the third [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mahfuz05.wordpress.com&amp;blog=2025347&amp;post=39&amp;subd=mahfuz05&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>for php developer it is very common problem  &#8221; Header already send&#8221;. recently we have faced such a problem. there three reason for that.</p>
<p>first one is if any space or other thing before starting &lt;?php tag .</p>
<p>second reason is if any output occur or echo or print command before redirect.</p>
<p>and the third is very uncommon . if  any body enter newline after ending php tad ?&gt; than it occur.</p>
<p>so if an one fetch this problem check this thing.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mahfuz05.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mahfuz05.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mahfuz05.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mahfuz05.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mahfuz05.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mahfuz05.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mahfuz05.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mahfuz05.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mahfuz05.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mahfuz05.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mahfuz05.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mahfuz05.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mahfuz05.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mahfuz05.wordpress.com/39/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mahfuz05.wordpress.com&amp;blog=2025347&amp;post=39&amp;subd=mahfuz05&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mahfuz05.wordpress.com/2010/06/04/header-already-send-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/083c8232199dafb6050ea5a4a92cdb7c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mahfuz05</media:title>
		</media:content>
	</item>
		<item>
		<title>Working with Ajax and JSON</title>
		<link>http://mahfuz05.wordpress.com/2010/02/18/working-with-ajax-and-json/</link>
		<comments>http://mahfuz05.wordpress.com/2010/02/18/working-with-ajax-and-json/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 11:14:15 +0000</pubDate>
		<dc:creator>mahfuz05</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://mahfuz05.wordpress.com/?p=29</guid>
		<description><![CDATA[Ajax means Asynchronous JavaScript and XML. its a very useful technique. normally ajax return output as xml format. xml is commonly used in web technology. but processing it and defining it some time difficult.But JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mahfuz05.wordpress.com&amp;blog=2025347&amp;post=29&amp;subd=mahfuz05&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Ajax means Asynchronous JavaScript and XML. its a very useful technique. normally ajax return output as xml format. xml is commonly used in web technology. but processing it and defining it some time difficult.But JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate.let see how it work with a easy example.<br />
let a html file called index.html it contain this</p>
<div id="_mcePaste">&lt;html&gt;</div>
<div id="_mcePaste">&lt;head&gt;</div>
<div id="_mcePaste">&lt;title&gt; ajax with php &lt;/title&gt;</div>
<div id="_mcePaste">&lt;script type=&#8221;text/JavaScript&#8221; src=&#8221;ajax.js&#8221;&gt;&lt;/script&gt;</div>
<div id="_mcePaste">&lt;/head&gt;</div>
<div id="_mcePaste">&lt;body onload=&#8217;ajaxprocess()&#8217;&gt;</div>
<div id="_mcePaste">Whats is your name:</div>
<div id="_mcePaste">&lt;input type=&#8221;text&#8221; id=&#8221;name&#8221; /&gt;</div>
<div id="_mcePaste">&lt;div id=&#8221;message&#8221; /&gt;</div>
<div id="_mcePaste">&lt;/body&gt;</div>
<div id="_mcePaste">&lt;/html&gt;</div>
<p>and ajax.js file  process the Ajax request.<br />
in here first need to create an request then process it<br />
<code><br />
var xmlhttp= cr();</code></p>
<p><code> </code></p>
<p><code>function cr()<br />
{<br />
var xmlhttp;<br />
// for Microsoft ie 6+<br />
if(window.ActiveXObject)<br />
{<br />
try<br />
{<br />
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");</code></p>
<p><code>}<br />
catch(e)<br />
{<br />
xmlhttp=false;<br />
}<br />
}<br />
// for mozilla or other browser<br />
else<br />
{<br />
try{<br />
xmlhttp=new XMLHttpRequest();<br />
}<br />
catch(e)<br />
{<br />
xmlhttp=false;<br />
}<br />
}</code></p>
<p><code> </code></p>
<p><code> if(!xmlhttp)<br />
alert("Error creating the file");<br />
else<br />
return xmlhttp;<br />
}<br />
</code><br />
after that we need to write the ajaxprocess() function<br />
<code><br />
function ajaxprocess()<br />
{<br />
if(xmlhttp.readyState ==4 || xmlhttp.readyState ==0)<br />
{<br />
name=encodeURIComponent(document.getElementById("name").value);<br />
// get data from name field<br />
xmlhttp.open("GET","ajax.php?name=" + name, true);<br />
// call the php function for processing data<br />
xmlhttp.onreadystatechange = handle;<br />
xmlhttp.send(null);<br />
}<br />
else<br />
{<br />
setTimeout('ajaxprocess()',1000);<br />
}<br />
}</code></p>
<p><code> </code><br />
Now we need return data from server add to the main page. return data<br />
are xml format<br />
<code><br />
function handle()<br />
{<br />
if(xmlhttp.readyState == 4)<br />
{<br />
if(xmlhttp.status == 200)<br />
{<br />
response = xmlhttp.responseXML; // response from server<br />
xmldomelement = response.documentElement;<br />
// get the message<br />
mess = xmldomelement.firstChild.data;<br />
document.getElementById("message").innerHTML='<em>'+mess+'</em>';<br />
setTimeout('ajaxprocess()',1000);<br />
}<br />
else<br />
{<br />
aleart("There is a problem accessing Server: "+xmlhttp.statusText);<br />
}<br />
}</code></p>
<p><code> </code><code>}</code><br />
now the ajax.php file looks like<br />
&lt;?php</p>
<p>header(&#8216;Content-Type: text/xml&#8217;);</p>
<p>echo &#8216;&lt;?xml version =&#8221;1.0&#8243; encoding =&#8221;UTF-8&#8243; standalone=&#8221;yes&#8221;?&gt;&#8217;;</p>
<p>echo &#8216;&lt;response&gt;&#8217;;</p>
<p>$name = $_GET['name'];</p>
<p>$username = array(&#8216;MAHFUZ&#8217;,'RANA&#8217;,'YOUSUF&#8217;,'MEHEDY&#8217;);</p>
<p>if(in_array(strtoupper($name),$username))</p>
<p>echo &#8216;Hello &#8216;.htmlentities($name).&#8217;!';</p>
<p>else if(trim($name) == &#8221;)</p>
<p>echo &#8216;Enter a name &#8216;;</p>
<p>else</p>
<p>echo htmlentities($name).&#8217;, i donot know&#8217;;</p>
<p>echo&#8217;&lt;/response&gt;&#8217;;</p>
<p>?&gt;</p>
<p>thats the normal ajax with xml. but if we want to process this with json<br />
we need some change.<br />
<code><br />
function ajaxprocess()<br />
{<br />
if(xmlhttp.readyState ==4 || xmlhttp.readyState ==0)<br />
{<br />
name=encodeURIComponent(document.getElementById("name").value);<br />
xmlhttp.open("GET","json.php?name=" + name, true);<br />
xmlhttp.onreadystatechange = handle;<br />
xmlhttp.send(null);<br />
}<br />
else<br />
{<br />
setTimeout('ajaxprocess()',1000);<br />
}<br />
}</code></p>
<p><code>function handle()<br />
{<br />
if(xmlhttp.readyState == 4)<br />
{<br />
if(xmlhttp.status == 200)<br />
{<br />
card = eval("(" + xmlhttp.responseText + ")");<br />
//eval function process the json data<br />
mess= card.name;</code></p>
<p><code> </code></p>
<p><code> document.getElementById("message").innerHTML = '<em>'+mess+'</em>';<br />
setTimeout('ajaxprocess()',1000);<br />
}<br />
else<br />
{<br />
aleart("There is a problem accessing Server: "+xmlhttp.statusText);<br />
}<br />
}<br />
}<br />
</code><br />
and the json.php file is</p>
<p>&lt;?php</p>
<p>header(&#8216;Content-Type: text/JavaScript&#8217;);</p>
<p>// json code start with {</p>
<p>echo &#8216;{ &#8220;name&#8221; :&#8217;;</p>
<p>$name = $_GET['name'];</p>
<p>$username = array(&#8216;MAHFUZ&#8217;,'RANA&#8217;,'YOUSUF&#8217;,'MEHEDY&#8217;);</p>
<p>if(in_array(strtoupper($name),$username))</p>
<p>echo &#8216;&#8221;Hello &#8216;.htmlentities($name).&#8217;!&#8221;&#8216;;</p>
<p>else if(trim($name) == &#8221;)</p>
<p>echo &#8216;&#8221;Enter a name &#8220;&#8216;;</p>
<p>else</p>
<p>echo &#8216;&#8221;&#8216;.htmlentities($name).&#8217;, i donot know&#8221;&#8216;;</p>
<p>echo&#8217; }&#8217;;</p>
<p>// and end with this  }</p>
<p>?&gt;</p>
<p>if we want to  json encode with php we can use this</p>
<p>&lt;?php</p>
<p>header(&#8216;Content-Type: text/JavaScript&#8217;);</p>
<p>$name = $_GET['name'];</p>
<p>$username = array(&#8216;MAHFUZ&#8217;,'RANA&#8217;,'YOUSUF&#8217;,'MEHEDY&#8217;);</p>
<p>if(in_array(strtoupper($name),$username))</p>
<p>$m=&#8217;Hello&#8217;.htmlentities($name).&#8217;!';</p>
<p>else if(trim($name) == &#8221;)</p>
<p>$m=&#8217;Enter a name &#8216;;</p>
<p>else</p>
<p>$m=htmlentities($name).&#8217;, i donot know&#8217;;</p>
<p>echo json_encode($m);</p>
<p>// json_encode() is a php function for json encoding json_decode() for decoding</p>
<p>?&gt;</p>
<p>thats all now play with your code what you want. but now we do not need such line of code for processing the ajax .with JQuery we can do this with only two line of code</p>
<p><code> $.ajax() function.<br />
that will be my next post.</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mahfuz05.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mahfuz05.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mahfuz05.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mahfuz05.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mahfuz05.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mahfuz05.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mahfuz05.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mahfuz05.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mahfuz05.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mahfuz05.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mahfuz05.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mahfuz05.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mahfuz05.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mahfuz05.wordpress.com/29/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mahfuz05.wordpress.com&amp;blog=2025347&amp;post=29&amp;subd=mahfuz05&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mahfuz05.wordpress.com/2010/02/18/working-with-ajax-and-json/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/083c8232199dafb6050ea5a4a92cdb7c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mahfuz05</media:title>
		</media:content>
	</item>
		<item>
		<title>Adding Image,Audio,Video in Database</title>
		<link>http://mahfuz05.wordpress.com/2010/02/17/adding-imageaudiovideo-in-database/</link>
		<comments>http://mahfuz05.wordpress.com/2010/02/17/adding-imageaudiovideo-in-database/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 21:15:22 +0000</pubDate>
		<dc:creator>mahfuz05</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[upload]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://mahfuz05.wordpress.com/?p=21</guid>
		<description><![CDATA[Some days ago when i was developing a photo gallery with Jquery. i need to store image and restore it for display. i was thinking how can i do it. by goggling and my friend rana told me it can be done by two way. one is storing image in blob format in database. but [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mahfuz05.wordpress.com&amp;blog=2025347&amp;post=21&amp;subd=mahfuz05&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Some days ago when i was developing a photo gallery with Jquery.</p>
<p>i need to store image and restore it for display. i was thinking how can i do it. by goggling and my friend rana told me it can be done by two way. one is storing image in blob format in database. but there is a problem with this when image size is big or number of image is big the database is going to heavy. so this technique is less used. another way is    storing image in a folder and saving link in database and then use it. this one is better.</p>
<p>for uploading a image need a file browser.</p>
<p><code></p>
<p></code></p>
<p>after uploading we need to process the file it need some server side script like php for categorize the image .this code like this</p>
<p><code>$pic_name = $_FILES ['image']['name'] ;</code></p>
<p>// for Processing JPEG Type Image.</p>
<p><code>if($_FILES['image']['type'] == 'image/jpeg' || $_FILES['image']['type'] == 'image/pjpeg')</code></p>
<p>// do some thing</p>
<p>// for Processing PNG Type Image.</p>
<p><code>else if($_FILES['image']['type'] == 'image/png' || $_FILES['image']['type'] == 'image/x-png')</code></p>
<p>//do something else</p>
<p>//and for GIF type Image</p>
<p><code>else if($_FILES['image']['type'] == 'image/gif')</code></p>
<p>after then we can upload image by this code<br />
<code>$address ='/upload/image/'.$pic_name;<br />
// $name is a picture name given by us and $address is where we want to upload the file</p>
<p>if(move_uploaded_file($_FILES ['image']['name'],$address))</code><br />
the show success.</p>
<p>we can upload music file the same way. only change is</p>
<p><code>if($_FILES['music']['type'] == 'audio/x-mp3' || $_FILES['music']['type'] == 'audio/mpeg')</code><br />
you can add other type if you needed.</p>
<p>for video file upload check with this</p>
<p><code>if($_FILES['video']['type'] == 'video/3gpp')</code></p>
<p>after uploading just save the file path to the database and retrive when need.<br />
i hope this little thing might help you.  </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mahfuz05.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mahfuz05.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mahfuz05.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mahfuz05.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mahfuz05.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mahfuz05.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mahfuz05.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mahfuz05.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mahfuz05.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mahfuz05.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mahfuz05.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mahfuz05.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mahfuz05.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mahfuz05.wordpress.com/21/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mahfuz05.wordpress.com&amp;blog=2025347&amp;post=21&amp;subd=mahfuz05&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mahfuz05.wordpress.com/2010/02/17/adding-imageaudiovideo-in-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/083c8232199dafb6050ea5a4a92cdb7c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mahfuz05</media:title>
		</media:content>
	</item>
		<item>
		<title>Connecting Mysql With JAVA.</title>
		<link>http://mahfuz05.wordpress.com/2009/04/06/connecting-mysql-with-java/</link>
		<comments>http://mahfuz05.wordpress.com/2009/04/06/connecting-mysql-with-java/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 22:24:30 +0000</pubDate>
		<dc:creator>mahfuz05</dc:creator>
				<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://mahfuz05.wordpress.com/?p=23</guid>
		<description><![CDATA[for connecting mysql with java first of all need mysql java connector jconnector. after downloading this extract it. then place it to Java\jdk1.6.0_03\jre\lib\ext . after this start coding. String DRIVER=&#8221;com.mysql.jdbc.Driver&#8221;; String DATABASE_URL=&#8221;jdbc:mysql://localhost/books&#8221;; Class.forName(JDBC_DRIVER); con=DriverManager.getConnection(DATABASE_URL,&#8221;root&#8221;,&#8221; password&#8221;); statement=con.createStatement(); then write your sql. String sql=&#8221;select * from admin&#8221;; ResultSet rs=statement.executeQuery(sql); // this for call by name rs.getInt(&#8220;roll&#8221;)); rs.getString(&#8220;name&#8221;)); or [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mahfuz05.wordpress.com&amp;blog=2025347&amp;post=23&amp;subd=mahfuz05&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>for connecting mysql with java first of all need mysql java connector jconnector.</p>
<p>after downloading this extract it. then place it to Java\jdk1.6.0_03\jre\lib\ext .</p>
<p>after this start coding.</p>
<p>String DRIVER=&#8221;com.mysql.jdbc.Driver&#8221;;</p>
<p>String DATABASE_URL=&#8221;jdbc:mysql://localhost/books&#8221;;</p>
<p>Class.forName(JDBC_DRIVER);</p>
<p>con=DriverManager.getConnection(DATABASE_URL,&#8221;root&#8221;,&#8221; password&#8221;);</p>
<p>statement=con.createStatement();</p>
<div>then write your sql.</div>
<div>
<div>String sql=&#8221;select * from admin&#8221;;</div>
<div>ResultSet rs=statement.executeQuery(sql);</div>
<div>// this for call by name</div>
<div>
<div>rs.getInt(&#8220;roll&#8221;));</div>
<div>rs.getString(&#8220;name&#8221;));</div>
<div></div>
<div>or write</div>
<div>// this for call by id no</div>
<div>rs.getString(1)</div>
<div>rs.getString(2)</div>
<div></div>
<div>then play with your code.</div>
</div>
<div></div>
</div>
<div></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mahfuz05.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mahfuz05.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mahfuz05.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mahfuz05.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mahfuz05.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mahfuz05.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mahfuz05.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mahfuz05.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mahfuz05.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mahfuz05.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mahfuz05.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mahfuz05.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mahfuz05.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mahfuz05.wordpress.com/23/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mahfuz05.wordpress.com&amp;blog=2025347&amp;post=23&amp;subd=mahfuz05&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mahfuz05.wordpress.com/2009/04/06/connecting-mysql-with-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/083c8232199dafb6050ea5a4a92cdb7c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mahfuz05</media:title>
		</media:content>
	</item>
		<item>
		<title>Make your own WordPress Template</title>
		<link>http://mahfuz05.wordpress.com/2008/09/23/make-your-own-wordpress-template/</link>
		<comments>http://mahfuz05.wordpress.com/2008/09/23/make-your-own-wordpress-template/#comments</comments>
		<pubDate>Tue, 23 Sep 2008 10:42:01 +0000</pubDate>
		<dc:creator>mahfuz05</dc:creator>
				<category><![CDATA[wordpress]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[template]]></category>

		<guid isPermaLink="false">http://mahfuz05.wordpress.com/?p=17</guid>
		<description><![CDATA[When i got my first project on WordPress i was warried   but i got some good tutorial .given below Site Architecture 1.5 The following is a description of the general site architecture for WordPress v1.5. WordPress Theme authors are encouraged to maintain much of the core site architecture of XHTML tags and CSS selectors, but [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mahfuz05.wordpress.com&amp;blog=2025347&amp;post=17&amp;subd=mahfuz05&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>When i got my first project on WordPress i was warried   but i got some good tutorial .given below</p>
<h2 class="pagetitle">Site Architecture 1.5</h2>
<p><!-- start content --></p>
<p>The following is a description of the general site architecture for WordPress  v1.5. WordPress Theme authors are encouraged to maintain much of the core site  architecture of XHTML tags and CSS selectors, but they are not required to.  Therefore, this is just a general outline and your Theme may be different.</p>
<p><a name="Template_Driven_Pages"></a></p>
<h2><span class="mw-headline">Template Driven Pages </span></h2>
<p>Before we get to the <a href="#Core_Structure">Core Structure</a> of  the WordPress page architecture, you need to understand that WordPress uses <a title="Templates" href="/Templates">template files</a> to generate the final page  &#8220;look&#8221; and content. For example, when viewing the front page of your WordPress  site, you are actually viewing several template files:</p>
<ul>
<li><tt>index.php</tt></li>
<li><tt>header.php</tt></li>
<li><tt>sidebar.php</tt></li>
<li><tt>footer.php</tt></li>
</ul>
<p>When you view a single post page, you might be viewing the following template  files:</p>
<ul>
<li><tt>single.php</tt></li>
<li><tt>header.php</tt></li>
<li><tt>sidebar.php</tt></li>
<li><tt>footer.php</tt></li>
<li><tt>comments.php</tt></li>
</ul>
<p>On a multi-post page like categories, archives, and search, you might be  viewing any combination of the following template files:</p>
<ul>
<li><tt>index.php</tt></li>
<li><tt>category.php</tt></li>
<li><tt>404.php</tt></li>
<li><tt>search.php</tt></li>
<li><tt>header.php</tt></li>
<li><tt>sidebar.php</tt></li>
<li><tt>footer.php</tt></li>
</ul>
<p>We&#8217;ve specified which CSS selectors belong in which template files as much as  possible in the following architecture specifications.</p>
<p><a name="Core_Structure"></a></p>
<h2><span class="mw-headline">Core Structure </span></h2>
<p>The core structure of a WordPress site represents the main containers which  hold the page&#8217;s content. The core structure of a WordPress site features, at a  minimum, are:</p>
<ul>
<li>Header</li>
<li>Sidebar/Menu</li>
<li>Content</li>
<li>Footer</li>
</ul>
<p>These are the main containers in which the most important parts of the page  are &#8220;contained&#8221;. Remember, the core structure is like building blocks. They are  dependent upon each other. If you change one, you have to change the others.</p>
<p><strong>Classic Theme</strong></p>
<pre>&lt;body&gt;
&lt;div id="rap"&gt;
&lt;h1 id="header"&gt;&lt;/h1&gt;
&lt;div id="content"&gt;&lt;/div&gt;
&lt;div id="menu"&gt;&lt;/div&gt;
&lt;p class="credit"&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/body&gt;</pre>
<p><strong>Default Theme</strong></p>
<pre>&lt;body&gt;
&lt;div id="page"&gt;
&lt;div id="header"&gt;&lt;/div&gt;
&lt;div id="content" class="narrowcolumn"&gt;&lt;/div&gt;
&lt;div id="sidebar"&gt;&lt;/div&gt;
&lt;div id="footer"&gt;&lt;/div&gt;
&lt;/div&gt;&lt;!-- end page --&gt;
&lt;/body&gt;</pre>
<p>While one calls their sidebar <tt>sidebar</tt> and the other <tt>menu</tt>,  the main difference between the two Theme&#8217;s core structures is the use of the  header and footer. For the Classic Theme, the header is in an <tt>h1</tt> tag  and the footer is in a paragraph tag. In the Default Theme, the header is in a  <tt>div</tt> called <tt>header</tt> and the footer is in the <tt>footer  div</tt>.</p>
<p>Both Themes feature a container that encompasses or &#8220;wraps&#8221; itself around the  entire page. This wrapping container allows for more definitive control over the  overall structure, often used in combination with the <tt>body</tt> tag. In  different WordPress Themes, these are also found by these names:</p>
<ul>
<li>container</li>
<li>page</li>
<li>wrap</li>
<li>rap</li>
</ul>
<p>Some Themes may add a second, third, or even fourth sidebar, creating a  column effect. Or they may include additional wrappers around the entire page or  specific containers, but this is the core structure.</p>
<p><a name="The_Modular_Template_Files"></a></p>
<h3><span class="mw-headline">The Modular Template Files </span></h3>
<p>Based upon the premise of building blocks, WordPress Themes divide up the  core structure between blocks called <a title="Templates" href="/Templates">template files</a>. These are the template files:</p>
<ul>
<li>Header &#8211; <tt>header.php</tt></li>
<li>Sidebar/Menu &#8211; <tt>sidebar.php</tt></li>
<li>Content &#8211; <tt>index.php</tt>, <tt>single.php</tt>, <tt>page.php</tt>,  <tt>category.php</tt>, <tt>author.php</tt>, <tt>search.php</tt>, etc.</li>
<li>Footer &#8211; <tt>footer.php</tt></li>
</ul>
<p>As you can see, the content container can be found across many other template  files. These are generated dependent upon the user&#8217;s request. If they click on a  category, the category template is displayed. If they choose a <a title="Pages" href="/Pages">Page</a>, the page template is used. And so on.</p>
<p>Combined with the <a title="The Loop" href="/The_Loop">WordPress Loop</a> and  queries, a variety of templates can be generated, and the web page designer can  style all of these differently and independently from each other.</p>
<p><a name="Interior_Structures"></a></p>
<h2><span class="mw-headline">Interior Structures </span></h2>
<p>Within these core structural containers are smaller building blocks that hold  the specific content within the parent container. WordPress Themes can feature a  variety of these, but we are going to concentrate on the two Themes that come  with WordPress. Most WordPress Themes are based on these two Themes.</p>
<p><a name="Header"></a></p>
<h3><span class="mw-headline">Header </span></h3>
<p>The header is the structure that traditionally sits at the top of a web page.  It contains the title of the website. It may also be referred to as the  <em>masthead, head, title</em>, and <em>banner</em>. In all WordPress Themes, the  <tt>header</tt> is found within the <tt>header.php</tt> template file.</p>
<p>The Classic Theme features the simplest header code:</p>
<pre>&lt;h1 id="header"&gt;&lt;/h1&gt;</pre>
<p>The Default Theme has a more complex header code:</p>
<pre>&lt;div id="header"&gt;
   &lt;div id="headerimg"&gt;
      &lt;h1&gt;&lt;/h1&gt;
         &lt;div class="description"&gt;&lt;/div&gt;
   &lt;/div&gt;
&lt;/div&gt;</pre>
<p>While the styles for the Classic Theme are found within the Theme&#8217;s  <tt>style.css</tt> style sheet file, styles for the Default Theme are found  within the <tt>style.css</tt> and the <tt>&lt;head&gt;</tt> of the  <tt>header.php</tt> <a title="Templates" href="/Templates">template file</a>.  Working with these styles is extensively covered in <a title="Designing Headers" href="/Designing_Headers">Designing Headers</a>.</p>
<p><a name="Content"></a></p>
<h3><span class="mw-headline">Content </span></h3>
<p>The content container in WordPress plays the most important role. It holds  the <a title="The Loop" href="/The_Loop">WordPress Loop</a> which dictates the  generation of content on the page depending upon the request by the user.</p>
<p>The Classic Theme has the simplest content structure:</p>
<pre>&lt;div id="content"&gt;
   &lt;h2&gt;Date&lt;/h2&gt;
   &lt;div class="post" id="post-1"&gt;
      &lt;h3 class="storytitle"&gt;Post Title&lt;/h3&gt;
      &lt;div class="meta"&gt;Post Meta Data&lt;/div&gt;
      &lt;div class="storycontent"&gt;
         &lt;p&gt;Welcome to WordPress.&lt;/p&gt;
      &lt;/div&gt;
      &lt;div class="feedback"&gt;Comments (2)&lt;/div&gt;
   &lt;/div&gt;
&lt;/div&gt;</pre>
<p>The Classic Theme hosts containers for the Date, Title, Post Meta Data, Post  Content, and Feedback (number of comments). It also showcases a powerful  feature. The ability to individually style a single post&#8217;s look.</p>
<pre>&lt;div class="post" id="post-1"&gt;</pre>
<p>The <tt>post</tt> CSS class selector applies the <tt>post</tt> styles to this  container, but it also has an ID which is generated automatically by WordPress.  The code looks like this:</p>
<pre>&lt;div class="post" id="post-&lt;?php the_ID(); ?&gt;"&gt;</pre>
<p>The use of the template tag <tt><a title="Template Tags/the ID" href="/Template_Tags/the_ID">the_ID()</a></tt> generates the ID number of the  post. This provides a unique identifier for internal page links as well as for  styles. This post could have a style for <tt>post-1</tt>, as could  <tt>post-2</tt>. While it is a bit excessive to feature a style for every post,  there may be a post or two you need to have look a little different. Some  plugins may use this identifier to automatically change the look of different  posts, too.</p>
<p>The Default Theme content container features a different look for  <strong>multi-post views</strong> like the front page, categories, archives, and searches,  and a different <strong>single post view</strong> for single posts. The multi-post view  looks like this:</p>
<pre>&lt;div id="content" class="narrowcolumn"&gt;
   &lt;div class="post" id="post-1"&gt;
      &lt;h2&gt;Post Title&lt;/h2&gt;
      &lt;small&gt;Date&lt;/small&gt;
      &lt;div class="entry"&gt;
         &lt;p&gt;Post Content.&lt;/p&gt;
      &lt;/div&gt;
      &lt;p class="postmetadata"&gt;Post Meta Data Section&lt;/p&gt;
    &lt;/div&gt;
    &lt;div class="navigation"&gt;
       &lt;div class="alignleft"&gt;Previous Post&lt;/div&gt;
       &lt;div class="alignright"&gt;Next Post&lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;</pre>
<p>There is a lot going on here. Let&#8217;s break it down.</p>
<dl>
<dt><tt>&lt;div id="content" class="narrowcolumn"&gt;</tt> </dt>
<dd>In the <strong>multi-post views</strong>, it features a <tt>class="narrowcolumn"</tt> and in the <strong>single post views</strong>, it features <tt>class="widecolumn"</tt> and  the sidebar is not generated on that page, allowing the post to be viewed &#8220;wide&#8221;  across the width of the content area. </dd>
</dl>
<dl>
<dt><tt>&lt;div class="post" id="post-1"&gt;</tt> </dt>
<dd>Like the Classic Theme, this division sets up the style for <tt>post</tt> and the identifier for <tt>post-X</tt>, with <tt>X</tt> representing the post&#8217;s  unique ID number. This allows for customizing the specific post&#8217;s look. </dd>
<dt><tt>&lt;h2&gt;Post Title&lt;/h2&gt;</tt> </dt>
<dd>This encompasses the post&#8217;s title code, styled by the <tt>&lt;h2&gt;</tt> tag. </dd>
<dt><tt>&lt;small&gt;Date&lt;/small&gt;</tt> </dt>
<dd>The date code is surrounded and styled by the <tt>small</tt> tag. </dd>
<dt><tt>&lt;div class="entry"&gt;</tt> </dt>
<dd>The post content is styled by a combination of the styles within the  <tt>entry</tt> CSS selectors and the paragraph tag. </dd>
<dt><tt>&lt;p class="postmetadata"&gt;Post Meta Data Section&lt;/p&gt;</tt> </dt>
<dd>The <a title="Post Meta Data Section" href="/Post_Meta_Data_Section">Post  Meta Data Section</a> contains the data details about the post such as the date,  time, and categories the post belongs to. </dd>
<dt><tt>&lt;div class="navigation"&gt;</tt> </dt>
<dd>The <a title="Next and Previous Links" href="/Next_and_Previous_Links">Next  and Previous Links</a> are styled in the <tt>navigation</tt>. They also include  classes for <tt>alignleft</tt> for the Previous Post and <tt>alignright</tt> for  the Next Post in chronological order. </dd>
</dl>
<p>These elements are shifted around in the <strong>single post view</strong> content  structure:</p>
<pre>&lt;div id="content" class="widecolumn"&gt;
   &lt;div class="navigation"&gt;
      &lt;div class="alignleft"&gt;&lt;/div&gt;
      &lt;div class="alignright"&gt;&lt;/div&gt;
   &lt;/div&gt;
   &lt;div class="post" id="post-1"&gt;
      &lt;h2&gt;Post Title&lt;/h2&gt;
      &lt;div class="entrytext"&gt;
         &lt;p&gt;Post content.&lt;/p&gt;
         &lt;p class="postmetadata alt"&gt;
            &lt;small&gt;Post Meta Data&lt;/small&gt;
         &lt;/p&gt;
      &lt;/div&gt;
   &lt;/div&gt;
&lt;/div&gt;</pre>
<p>The <tt>widecolumn</tt> class is featured to stretch the content across the  page to fill in the absence of the sidebar. The <tt>navigation</tt> has been  moved up to the top. And the Post Meta Data is now incorporated into the  <tt>entrytext</tt> parent container and styled differently with an <tt>alt</tt> style added.</p>
<p>These two examples from the Default Theme give you just a glimpse into the  myriad ways your WordPress site can be customized.</p>
<p><a name="Comments"></a></p>
<h4><span class="mw-headline">Comments </span></h4>
<p>Comments may be featured on the single post view or in a popup window. The  overall styles for the two sets of comments remain basically the same. The two  template files are <tt>comments.php</tt> and <tt>comments-popup.php</tt></p>
<p><a name="Classic_Theme_Comments"></a></p>
<h5><span class="mw-headline">Classic Theme Comments </span></h5>
<pre>&lt;h2 id="comments"&gt;1 Comment
  &lt;a href="#postcomment" title="Leave a comment"&gt;»&lt;/a&gt;&lt;/h2&gt;
   &lt;ol id="commentlist"&gt;
      &lt;li id="comment-1"&gt;
         &lt;p&gt;Hi, this is a comment.&lt;/p&gt;
         &lt;p&gt;&lt;cite&gt;Comment by Person&lt;/cite&gt; &lt;/p&gt;
      &lt;/li&gt;
   &lt;/ol&gt;
&lt;p&gt;
  &lt;a href='http://example.com/archives/name-of-post/feed/'&gt;
  &lt;abbr title="Really Simple Syndication"&gt;RSS&lt;/abbr&gt;
  feed for comments on this post.&lt;/a&gt;
  &lt;a href="http://example.com/name-of-post/trackback/" rel="trackback"&gt;
  TrackBack &lt;abbr title="Uniform Resource Identifier"&gt;URI&lt;/abbr&gt;
  &lt;/a&gt;
&lt;/p&gt;
  &lt;h2 id="postcomment"&gt;Leave a comment&lt;/h2&gt;
    &lt;form action="http://example.com/blog/wp-comments-post.php"
method="post" id="commentform"&gt;
      &lt;p&gt;
          &lt;input type="text" name="author" id="author" value="" size="22" tabindex="1" /&gt;
          &lt;label for="author"&gt;
          &lt;small&gt;Name (required)&lt;/small&gt;
          &lt;/label&gt;
       &lt;/p&gt;
       &lt;p&gt;
          &lt;input type="text" name="email" id="email" value="" size="22" tabindex="2" /&gt;
          &lt;label for="email"&gt;
          &lt;small&gt;Mail (will not be published) required)&lt;/small&gt;
          &lt;/label&gt;
       &lt;/p&gt;
       &lt;p&gt;
          &lt;input type="text" name="url" id="url" value="" size="22" tabindex="3" /&gt;
          &lt;label for="url"&gt;
          &lt;small&gt;Website&lt;/small&gt;
          &lt;/label&gt;
        &lt;/p&gt;
        &lt;p&gt;
          &lt;small&gt;&lt;strong&gt;XHTML:&lt;/strong&gt; List of Tags you
          can use in comments&lt;/small&gt;
        &lt;/p&gt;
        &lt;p&gt;
          &lt;textarea name="comment" id="comment" cols="100%" rows="10" tabindex="4"&gt;
          &lt;/textarea&gt;
        &lt;/p&gt;
        &lt;p&gt;
          &lt;input name="submit" type="submit" id="submit" tabindex="5" value="Submit Comment" /&gt;
          &lt;input type="hidden" name="comment_post_ID" value="1" /&gt;
       &lt;/p&gt;
   &lt;/form&gt;
&lt;/div&gt;</pre>
<p>While individual sections of the comments feature styling reference, the  Classic Theme has no general comment division or group style reference, one  could be easily added.</p>
<dl>
<dt>#comments h2 </dt>
<dd>Styles the title at the top of the comments list which says &#8220;Comments 4  Leave a Comment&#8221;, with the latter part of the sentence in a link that jumps to  <tt>&lt;h2 id="postcomment"&gt;Leave a comment&lt;/h2&gt;</tt>. </dd>
<dt>#comment-n </dt>
<dd>Comments are given a unique ID number, signified here by the letter  <tt>n</tt>. This allows them to be styled individually. </dd>
<dt>#comments ol </dt>
<dd>This begins the <strong>ordered list</strong> of the comments, counting down from one,  and sets the overall style of the comments list. </dd>
<dt>#comments li </dt>
<dd>Style reference for each comment on the list. </dd>
<dt>#comments p </dt>
<dd>This paragraph tag styles the actual comments on the comment list. </dd>
<dt>#comment cite </dt>
<dd>This use of the <tt>cite</tt> controls the look of the commenter&#8217;s name. It  usually states &#8220;Name says:&#8221; in the comments list. </dd>
<dt>#comments h2 or #postcomment </dt>
<dd>The <tt>h2</tt> heading can be styled two ways, as <tt>#comments h2</tt> or  <tt>#postcomment</tt>. The latter is used by the &#8220;Leave a Comment&#8221; link from the  top of the comments section, too. </dd>
<dt>#commentform </dt>
<dd>Style reference for the overall &#8220;form&#8221; for inputting comments. Each input  area has it&#8217;s own ID. </dd>
<dt>#author </dt>
<dd>ID reference for the comment author&#8217;s input area. </dd>
<dt>#comments small </dt>
<dd>The <tt>&lt;small&gt;</tt> tag is used in several places in the Classic  Theme. This usage surrounds the text in the <strong>comment submit form</strong> and the  text for the <strong>list of tags</strong> that can be used in the comment. </dd>
<dt>#email </dt>
<dd>ID reference for the comment author&#8217;s email. </dd>
<dt>#url </dt>
<dd>ID reference for the comment author&#8217;s URL. </dd>
<dt>#comment </dt>
<dd>ID reference for the comment input textarea. It does not style the final  generated comment, just the input box. </dd>
<dt>#comment #submit </dt>
<dd>There are two submit buttons in the Classic Theme, for search and comment  submissions. This is the submit comment button. </dd>
</dl>
<p><a name="Default_Theme_Comments"></a></p>
<h5><span class="mw-headline">Default Theme Comments </span></h5>
<p>The Default Theme comments feature a loop query within the  <tt>comments.php</tt> and <tt>comments-popup.php</tt> which changes some of the  information depending upon if comments are open, closed, and any present. If the  comments are open or closed and no comments have been made, this information  will be displayed within the <tt>&lt;h3 id="comments"&gt;</tt> tag.</p>
<pre>&lt;h3 id="comments"&gt;One Response to "Hello world!"&lt;/h3&gt;
   &lt;ol class="commentlist"&gt;
      &lt;li class="alt" id="comment-1"&gt;
         &lt;cite&gt;
 &lt;a href="http://example.org/" rel="external nofollow"&gt;Mr WordPress&lt;/a&gt;
         &lt;/cite&gt; Says:&lt;br /&gt;
           &lt;small class="commentmetadata"&gt;
             &lt;a href="#comment-1" title=""&gt;Date and Time&lt;/a&gt;
           &lt;/small&gt;
            &lt;p&gt;Hi, this is a comment.&lt;/p&gt;
      &lt;/li&gt;
   &lt;/ol&gt;
 &lt;h3 id="respond"&gt;Leave a Reply&lt;/h3&gt;
&lt;form action="http://example.com/blog/wp-comments-post.php" method="post" id="commentform"&gt;
   &lt;p&gt;
       &lt;input name="author" id="author" value="" size="22" tabindex="1" type="text"&gt;
          &lt;label for="author"&gt;
             &lt;small&gt;Name (required)&lt;/small&gt;
          &lt;/label&gt;
   &lt;/p&gt;
   &lt;p&gt;
       &lt;input name="email" id="email" value="" size="22" tabindex="2" type="text"&gt;
          &lt;label for="email"&gt;
              &lt;small&gt;Mail (will not be published) required)&lt;/small&gt;
          &lt;/label&gt;
   &lt;/p&gt;
   &lt;p&gt;
       &lt;input name="url" id="url" value="" size="22" tabindex="3" type="text"&gt;
          &lt;label for="url"&gt;
             &lt;small&gt;Website&lt;/small&gt;
          &lt;/label&gt;
   &lt;/p&gt;
   &lt;p&gt;
       &lt;small&gt;&lt;strong&gt;XHTML:&lt;/strong&gt; You can use these
       tags:....&lt;/small&gt;
   &lt;/p&gt;
   &lt;p&gt;
       &lt;textarea name="comment" id="comment" cols="100" rows="10" tabindex="4"&gt;
       &lt;/textarea&gt;
   &lt;/p&gt;
   &lt;p&gt;
       &lt;input name="submit" id="submit" tabindex="5" value="Submit Comment" type="submit"&gt;
       &lt;input name="comment_post_ID" value="1" type="hidden"&gt;
   &lt;/p&gt;
&lt;/form&gt;
&lt;/div&gt;</pre>
<p>While individual sections of the comments feature styling reference, the  Default Theme has no general comment division or group style reference, though  one could be easily added.</p>
<dl>
<dt>h3 #comments </dt>
<dd>Styles the <tt>&lt;h3&gt;</tt> tag for the &#8220;number of responses to the post&#8221;  heading. </dd>
<dt>#commentlist ol </dt>
<dd>Styles the &#8220;ordered list&#8221; of the comments list. </dd>
<dt>.alt li and #commenet-n </dt>
<dd>The comment list items have two style references. The first one is the class  <tt>alt</tt> and the second is the comment ID number signified here by the  letter <tt>n</tt>. This allows them to be styled individually. </dd>
<dt>cite </dt>
<dd>The tag <tt>cite</tt> frames the &#8220;Name says:&#8221; and link to the comment  author&#8217;s URL. </dd>
<dt>.commentmetadata small </dt>
<dd>The <tt>&lt;small&gt;</tt> tag has a class of <tt>commentmetadata</tt> which  allows the date and time of the post to be styled. </dd>
<dt>ol #commentlist p </dt>
<dd>Styles the paragraph within the ordered list of comments. </dd>
<dt>#respond h3 </dt>
<dd>Styles the heading for &#8220;Leave a Reply&#8221;. </dd>
<dt>#commentform </dt>
<dd>Style reference for the overall &#8220;form&#8221; for inputting comments. Each input  area has it&#8217;s own ID. </dd>
<dt>#author </dt>
<dd>ID reference for the comment author&#8217;s input area. </dd>
<dt>#comments small </dt>
<dd>The <tt>&lt;small&gt;</tt> tag is used in several places in the Classic  Theme. This usage surrounds the text in the <strong>comment submit form<em> and the  text for the </em></strong><em>list of tags&#8217;</em> that can be used in the comment. </dd>
<dt>#email </dt>
<dd>ID reference for the comment author&#8217;s email. </dd>
<dt>#url </dt>
<dd>ID reference for the comment author&#8217;s URL. </dd>
<dt>#comment </dt>
<dd>ID reference for the comment input textarea. It does not style the final  generated comment, just the input box. </dd>
<dt>#comment #submit </dt>
<dd>There are two submit buttons in the Classic Theme, for search and comment  submissions. This is the submit comment button. </dd>
</dl>
<p><a name="Popup_Comments"></a></p>
<h5><span class="mw-headline">Popup Comments </span></h5>
<p>The Classic and Default Themes&#8217; <tt>comments-popup.php</tt> template file is  essentially the same. They use the layout for the <a href="#Default_Theme_Comments">Classic Theme comment structure</a>. While the  Classic Theme uses <tt>&lt;h2&gt;</tt> headings and the Default Theme uses  <tt>&lt;h3&gt;</tt> headings for the title headings in their comments, in the  <tt>comments-popup.php</tt> template file, they both use the <tt>&lt;h2&gt;</tt> heading tag.</p>
<pre>&lt;body id="commentspopup"&gt;
&lt;h1 id="header"&gt;&lt;/h1&gt;
&lt;h2 id="comments"&gt;Comments&lt;/h2&gt;
....Classic Theme commment section.....
...Classic Theme footer....</pre>
<p>The <tt>body</tt> tag sets the style for the overall page with  <tt>#commentspopup</tt>. The <tt>h2</tt> heading begins the comments section.</p>
<p>If you make modifications to the structure of the tags within the header and  footer of the overall Theme, ensure those structural changes are applied to the  comments popup template, especially if you will be <a title="Designing Themes for Public Release" href="/Designing_Themes_for_Public_Release">releasing the Theme to the  public</a>.</p>
<p><a name="Sidebar"></a></p>
<h3><span class="mw-headline">Sidebar </span></h3>
<p>As you saw with the Default Theme, the sidebar can be visible or not,  depending upon the template file in use. The sidebar, in general, can be simple  or complex. WordPress Themes often feature information within the sidebar in  <strong>nested lists</strong>. There is a step-by-step guide for the sidebar at <a title="Customizing Your Sidebar" href="/Customizing_Your_Sidebar">Customizing  Your Sidebar</a> and more information on <a title="Styling Lists with CSS" href="/Styling_Lists_with_CSS">Styling Lists with CSS</a>, too.</p>
<p>In general, the WordPress sidebar features titles of the various sections  within a list, with the section items in a nested list below the title.</p>
<p>The Classic Theme sidebar looks like this, with the links removed for  simplification:</p>
<pre>&lt;div id="menu"&gt;
   &lt;ul&gt;
      &lt;li class="pagenav"&gt;Pages
         &lt;ul&gt;
           &lt;li class="page_item"&gt;Contact&lt;/li&gt;
           &lt;li class="page_item"&gt;About&lt;/li&gt;
         &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li id="linkcat-1"&gt;&lt;h2&gt;Blogroll&lt;/h2&gt;
         &lt;ul&gt;
            &lt;li&gt;Blogroll Link 1&lt;/li&gt;
            &lt;li&gt;Blogroll Link 1&lt;/li&gt;
            &lt;li&gt;Blogroll Link 1&lt;/li&gt;
         &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li id="categories"&gt;Categories:
         &lt;ul&gt;
          &lt;li&gt;Category Link 1&lt;/li&gt;
          &lt;li&gt;Category Link 2&lt;/li&gt;
         &lt;/ul&gt;
       &lt;/li&gt;
       &lt;li id="search"&gt;
          &lt;label for="s"&gt;Search:&lt;/label&gt;
          &lt;form id="searchform" method="get" action="/index.php"&gt;
      &lt;div&gt;
         &lt;input type="text" name="s" id="s" size="15" /&gt;&lt;br /&gt;
         &lt;input type="submit" value="Search" /&gt;
      &lt;/div&gt;
         &lt;/form&gt;
       &lt;/li&gt;
       &lt;li id="archives"&gt;Archives:
         &lt;ul&gt;
             &lt;li&gt;Archives Month Link 1&lt;/li&gt;
             &lt;li&gt;Archives Month Link 2&lt;/li&gt;
          &lt;/ul&gt;
       &lt;/li&gt;
       &lt;li id="meta"&gt;Meta:
         &lt;ul&gt;
            &lt;li&gt;RSS Feed Link&lt;/li&gt;
            &lt;li&gt;RSS Comments Feed Link&lt;/li&gt;
            &lt;li&gt;XHTML Validator&lt;/li&gt;
            &lt;li&gt;XFN Link&lt;/li&gt;
            &lt;li&gt;WordPress Link&lt;/li&gt;
         &lt;/ul&gt;
       &lt;/li&gt;
   &lt;/ul&gt;
&lt;/div&gt;</pre>
<p>Most of these are self-explanatory. Each set of links has its own CSS  selector: <a title="Pages" href="/Pages">Pages</a>, categories, archives, search,  and meta.</p>
<p><a name="Pages_and_Link_Categories"></a></p>
<h4><span class="mw-headline">Pages and Link Categories </span></h4>
<p>The <a title="Pages" href="/Pages">Pages</a> and <a title="Links Manager" href="/Links_Manager">Links</a> category, labeled &#8220;Blogroll&#8221;, uses the <tt><a title="Template Tags/get links list" href="/Template_Tags/get_links_list">&lt;?php get_links_list(); ?&gt;</a></tt> and <tt><a title="Template Tags/wp list pages" href="/Template_Tags/wp_list_pages">&lt;?php wp_list_pages(); ?&gt;</a></tt> template tags which automatically generates a heading.</p>
<p>For the <strong>Links</strong> category, it generates an <tt>h2</tt> heading for that  set of links. This means you can style the <tt>menu h2</tt> heading to look  differently from the rest of the headings, or, if you want them to all look the  same, make sure that the <tt>menu h2</tt> style <em>matches</em> the rest of the  category styles which are not automatically generated.</p>
<p>The <strong>Pages</strong> template tag generates <tt>pagenav</tt> as the heading and  then identifies the pages in a new way. As a general list viewed on mutli-post  and single post views, the Page list items feature a <tt>class="page_item"</tt> to style those links. When viewing an individual Page, that Page&#8217;s link will  change to <tt>class="current_page_item"</tt>, which can then be styled to look  differently from the rest of the Page links.</p>
<p><a name="Categories.2C_Archives.2C_and_Meta"></a></p>
<h4><span class="mw-headline">Categories, Archives, and Meta </span></h4>
<p>The other sidebar section titles, <em>categories</em>, <em>archives</em>,  <em>meta</em>, and others, do not use template tags which generate their own  titles. These are set inside of PHP statements which &#8220;print&#8221; the text on the  page. While these could be put inside of <a title="Designing Headings" href="/Designing_Headings">heading tags</a>, WordPress uses the <tt>_e()</tt> function to display or &#8220;echo&#8221; the text titles while also marking the text as a  possible target for language translation. If you will be <a title="Theme Development" href="/Theme_Development">developing your theme</a> for <a title="Designing Themes for Public Release" href="/Designing_Themes_for_Public_Release">public release</a>, using the echo  functions is highly recommended.</p>
<p>You can style these individually or all the same. Some Themes, like the  Default Theme, put all these in <tt>&lt;h2&gt;</tt> headings so the list  headings will all look the same. Therefore, they may or may not use style  references for each section. You may add them if you need them to change the  look of each section of links.</p>
<p><a name="Search_Form"></a></p>
<h4><span class="mw-headline">Search Form </span></h4>
<p>The search form is found within the <tt>searchform.php</tt>. It may be found  in different locations within the sidebar. To style the overall search form, use  the <tt>search</tt> ID. Here is a list of the individual areas of the search  form which may be styled by default. You may add style classes to gain more  control over the look of your search form.</p>
<pre>&lt;li id="search"&gt;
  &lt;label for="s"&gt;Search:&lt;/label&gt;
    &lt;form id="searchform" method="get" action="/index.php"&gt;
      &lt;div&gt;
         &lt;input type="text" name="s" id="s" size="15" /&gt;&lt;br /&gt;
         &lt;input type="submit" value="Search" /&gt;
      &lt;/div&gt;
     &lt;/form&gt;</pre>
<dl>
<dt><tt>#search</tt> </dt>
<dd>The overall style for the search form. </dd>
<dt><tt>#search label</tt> </dt>
<dd>Used to style the <tt>label</tt> tag, if necessary. </dd>
<dt><tt>#searchform</tt> </dt>
<dd>Used to style the form itself. </dd>
<dt><tt>#search div</tt> </dt>
<dd>This unlabeled <tt>div</tt> is a child container of the parent container  <tt>search</tt> and maybe styled from within that selector. </dd>
<dt><tt>#searchform input</tt> </dt>
<dd>To style the input area for the search, this selector combination will work. </dd>
<dt><tt>#searchsubmit</tt> </dt>
<dd><em>Used by the Default Theme</em>, this selector may be used to style the  <strong>search</strong> or <strong>submit</strong> button. </dd>
</dl>
<p>The search form area, input, and button can be styled in many ways, or left  with the default input and &#8220;button&#8221; look.</p>
<p><a name="Meta_Feed_Links"></a></p>
<h4><span class="mw-headline">Meta Feed Links </span></h4>
<p>The Meta links may be shown as text or icons representing the various links.  The XHTML and CSS validation links may use the W3 icons. The various Feeds can  also be represented as icons. Or left as text. It&#8217;s up to you. Use of the feeds  within your sidebar with text or icons is covered by the article <a title="WordPress Feeds" href="/WordPress_Feeds">WordPress Feeds</a>.</p>
<p><a name="Footer"></a></p>
<h3><span class="mw-headline">Footer </span></h3>
<p>The footer is found within the <tt>footer.php</tt> template file. In both the  Default and Classic Themes, the footer contains little information.</p>
<p><strong>Classic Theme</strong></p>
<pre>&lt;p class="credit"&gt;
   &lt;!--15 queries. 0.152 seconds. --&gt;
    &lt;cite&gt;
        Powered by &lt;a href='http://wordpress.org'
        title='Powered by WordPress, state-of-the-art
        semantic personal publishing platform.'&gt;
        &lt;strong&gt;WordPress&lt;/strong&gt;&lt;/a&gt;
    &lt;/cite&gt;
&lt;/p&gt;
&lt;/div&gt;</pre>
<p>The footer&#8217;s content is styled with the <tt>credit</tt> class and the  paragraph and <tt>cite</tt> tags.</p>
<p>The tag displays the number of mysql queries used on the page and the time it  took for the page to load, in HTML commented code. It is there for the  administrator&#8217;s convenience and use. It is only visible within the page&#8217;s source  code. If you would like to display this visible on the page, remove the <a title="Commenting Code" href="/Commenting_Code">comments</a>. It&#8217;s look will be  influenced by the <tt>credit</tt> class style of the paragraph tag. On the  template file, it looks like this:</p>
<pre>&lt;!--&lt;?php echo $wpdb-&gt;num_queries; ?&gt; queries.
&lt;?php timer_stop(1); ?&gt; seconds. --&gt;</pre>
<p><strong>Default Theme</strong></p>
<pre>&lt;div id="footer"&gt;
   &lt;p&gt;Blogging in the WordPress World
      is proudly powered by
      &lt;a href="http://wordpress.org/"&gt;WordPress&lt;/a&gt;&lt;br /&gt;
      &lt;a href="feed:http://example.com/feed/"&gt;Entries (RSS)&lt;/a&gt;
      and
      &lt;a href="feed:http://example.com/comments/feed/"&gt;
      Comments (RSS)&lt;/a&gt;.
    &lt;!-- 18 queries. 0.186 seconds. --&gt;
   &lt;/p&gt;
&lt;/div&gt;</pre>
<p>The Default Theme&#8217;s footer is styled by the <tt>footer</tt> ID and the  paragraph tag. While the footer area itself maybe styled by the <tt>footer</tt>,  the paragraph tag controls the text within it. To style the paragraph tag  differently within the <tt>footer</tt> than the rest of your page:</p>
<pre>#footer p {styles}</pre>
<p>I got this from <a href="http://codex.wordpress.org">codex</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mahfuz05.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mahfuz05.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mahfuz05.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mahfuz05.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mahfuz05.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mahfuz05.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mahfuz05.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mahfuz05.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mahfuz05.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mahfuz05.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mahfuz05.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mahfuz05.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mahfuz05.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mahfuz05.wordpress.com/17/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mahfuz05.wordpress.com&amp;blog=2025347&amp;post=17&amp;subd=mahfuz05&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mahfuz05.wordpress.com/2008/09/23/make-your-own-wordpress-template/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/083c8232199dafb6050ea5a4a92cdb7c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mahfuz05</media:title>
		</media:content>
	</item>
	</channel>
</rss>
