<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Simple Pagination in PHP tutorial</title>
	<atom:link href="http://www.codediesel.com/php/simple-pagination-in-php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.codediesel.com/php/simple-pagination-in-php/</link>
	<description>/* PHP &#38; MySQL Journal */</description>
	<lastBuildDate>Fri, 27 Jan 2012 16:39:42 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: Hyder</title>
		<link>http://www.codediesel.com/php/simple-pagination-in-php/comment-page-1/#comment-1938</link>
		<dc:creator>Hyder</dc:creator>
		<pubDate>Sun, 16 May 2010 18:11:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.codediesel.com/?p=118#comment-1938</guid>
		<description>Nice article .nowadays there&#039;s  another sort of pagination similar to facebook and twitter . 
it&#039;s worth reading , see it guys 
http://youhack.me/2010/05/14/an-alternative-to-pagination-facebook-and-twitter-style/</description>
		<content:encoded><![CDATA[<p>Nice article .nowadays there&#8217;s  another sort of pagination similar to facebook and twitter .<br />
it&#8217;s worth reading , see it guys<br />
<a href="http://youhack.me/2010/05/14/an-alternative-to-pagination-facebook-and-twitter-style/" rel="nofollow">http://youhack.me/2010/05/14/an-alternative-to-pagination-facebook-and-twitter-style/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Using PEAR Pager with PHP PDO &#124; Abby and Win's Blog</title>
		<link>http://www.codediesel.com/php/simple-pagination-in-php/comment-page-1/#comment-1740</link>
		<dc:creator>Using PEAR Pager with PHP PDO &#124; Abby and Win's Blog</dc:creator>
		<pubDate>Tue, 16 Mar 2010 18:22:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.codediesel.com/?p=118#comment-1740</guid>
		<description>[...] Here&#8217;s a tutorial I found that helped me out a lot &#8211; http://www.codediesel.com/php/simple-pagination-in-php/. [...]</description>
		<content:encoded><![CDATA[<p>[...] Here&#8217;s a tutorial I found that helped me out a lot &#8211; <a href="http://www.codediesel.com/php/simple-pagination-in-php/" rel="nofollow">http://www.codediesel.com/php/simple-pagination-in-php/</a>. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sameer</title>
		<link>http://www.codediesel.com/php/simple-pagination-in-php/comment-page-1/#comment-1713</link>
		<dc:creator>sameer</dc:creator>
		<pubDate>Tue, 09 Mar 2010 04:44:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.codediesel.com/?p=118#comment-1713</guid>
		<description>You can add extra GET variables in the options array as below:

$pager_options = array(
    &#039;mode&#039;       =&gt; &#039;Sliding&#039;,   // Sliding or Jumping mode. See below.
    &#039;perPage&#039;    =&gt; 10,   // Total rows to show per page
    &#039;delta&#039;      =&gt; 4,   // See below
    &#039;totalItems&#039; =&gt; $totalItems,

     &#039;extraVars&#039; =&gt; array(
        &#039;firstName&#039;  =&gt; &#039;John&#039;,
        &#039;LastName&#039; =&gt; &#039;Gates&#039;)
);</description>
		<content:encoded><![CDATA[<p>You can add extra GET variables in the options array as below:</p>
<p>$pager_options = array(<br />
    &#8216;mode&#8217;       =&gt; &#8216;Sliding&#8217;,   // Sliding or Jumping mode. See below.<br />
    &#8216;perPage&#8217;    =&gt; 10,   // Total rows to show per page<br />
    &#8216;delta&#8217;      =&gt; 4,   // See below<br />
    &#8216;totalItems&#8217; =&gt; $totalItems,</p>
<p>     &#8216;extraVars&#8217; =&gt; array(<br />
        &#8216;firstName&#8217;  =&gt; &#8216;John&#8217;,<br />
        &#8216;LastName&#8217; =&gt; &#8216;Gates&#8217;)<br />
);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin</title>
		<link>http://www.codediesel.com/php/simple-pagination-in-php/comment-page-1/#comment-1712</link>
		<dc:creator>Martin</dc:creator>
		<pubDate>Mon, 08 Mar 2010 17:14:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.codediesel.com/?p=118#comment-1712</guid>
		<description>How can you carry over your own variables into the URL?

I am using a form to POST a couple of variables (firstname and surname). The first page that is generated is fine, however pressing on page 2 then looses all the variables that have been posted which then displays the either contents of database.

quick example:
&lt;code&gt;
$perPage = $pager_options[&#039;perPage&#039;];

$result = mysql_query(&quot;SELECT * FROM table WHERE person_firstname LIKE &#039;%$firstname%&#039; AND person_surname LIKE &#039;%$surname%&#039; LIMIT $from , $perPage&quot;, $connection);
&lt;/code&gt;

I am presuming I need to add something to the $pager_options but I can&#039;t figure out which part of Pager::factory() to use.</description>
		<content:encoded><![CDATA[<p>How can you carry over your own variables into the URL?</p>
<p>I am using a form to POST a couple of variables (firstname and surname). The first page that is generated is fine, however pressing on page 2 then looses all the variables that have been posted which then displays the either contents of database.</p>
<p>quick example:<br />
<code><br />
$perPage = $pager_options['perPage'];</p>
<p>$result = mysql_query("SELECT * FROM table WHERE person_firstname LIKE '%$firstname%' AND person_surname LIKE '%$surname%' LIMIT $from , $perPage", $connection);<br />
</code></p>
<p>I am presuming I need to add something to the $pager_options but I can&#8217;t figure out which part of Pager::factory() to use.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sameer</title>
		<link>http://www.codediesel.com/php/simple-pagination-in-php/comment-page-1/#comment-1586</link>
		<dc:creator>sameer</dc:creator>
		<pubDate>Thu, 24 Dec 2009 05:09:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.codediesel.com/?p=118#comment-1586</guid>
		<description>Hello Rancho, you could create a drop-down with the items to show per page. After selecting the drop-down, you could pass then set the per page items in a session, $_SESSION[&#039;perPage&#039;] and then use it in your code.


$pager_options = array(
‘mode’ =&gt; ‘Sliding’,
‘perPage’ =&gt; $_SESSION[&#039;perPage&#039;] ,
‘delta’ =&gt; 4,
//’separator’ =&gt; ‘,’,
‘totalItems’ =&gt; $totalItems,
);
</description>
		<content:encoded><![CDATA[<p>Hello Rancho, you could create a drop-down with the items to show per page. After selecting the drop-down, you could pass then set the per page items in a session, $_SESSION['perPage'] and then use it in your code.</p>
<p>$pager_options = array(<br />
‘mode’ =&gt; ‘Sliding’,<br />
‘perPage’ =&gt; $_SESSION['perPage'] ,<br />
‘delta’ =&gt; 4,<br />
//’separator’ =&gt; ‘,’,<br />
‘totalItems’ =&gt; $totalItems,<br />
);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rancho</title>
		<link>http://www.codediesel.com/php/simple-pagination-in-php/comment-page-1/#comment-1584</link>
		<dc:creator>rancho</dc:creator>
		<pubDate>Wed, 23 Dec 2009 12:57:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.codediesel.com/?p=118#comment-1584</guid>
		<description>use your code,it works fine,but i have one question, in a webpage where i used your pagination script , where we previously wrote the no of item per page we want to show,but i want to do that ,when any user see my website he has a option that how many item he wants to show per page,suppose Show Item Per Page:10&#124;20&#124;30&#124;40.How can i do this ?Please help me.
this is my code:
require_once (&#039;Pager/Pager.php&#039;);  
$result=mysql_query(&quot;SELECT count(*) AS total FROM product where product_name LIKE &#039;a%&#039;; &quot;);
$row = mysql_fetch_array($result);
$totalItems = $row[&#039;total&#039;];   
$pager_options = array(
&#039;mode&#039;       =&gt; &#039;Sliding&#039;,
&#039;perPage&#039;    =&gt; 2,
&#039;delta&#039;      =&gt; 4,
//&#039;separator&#039; =&gt; &#039;,&#039;,
&#039;totalItems&#039; =&gt; $totalItems,
);
$pager = Pager::factory($pager_options);
echo $pager-&gt;links;
list($from, $to) = $pager-&gt;getOffsetByPageId();
$from = $from - 1;
$perPage = $pager_options[&#039;perPage&#039;];</description>
		<content:encoded><![CDATA[<p>use your code,it works fine,but i have one question, in a webpage where i used your pagination script , where we previously wrote the no of item per page we want to show,but i want to do that ,when any user see my website he has a option that how many item he wants to show per page,suppose Show Item Per Page:10|20|30|40.How can i do this ?Please help me.<br />
this is my code:<br />
require_once (&#8216;Pager/Pager.php&#8217;);<br />
$result=mysql_query(&#8220;SELECT count(*) AS total FROM product where product_name LIKE &#8216;a%&#8217;; &#8220;);<br />
$row = mysql_fetch_array($result);<br />
$totalItems = $row['total'];<br />
$pager_options = array(<br />
&#8216;mode&#8217;       =&gt; &#8216;Sliding&#8217;,<br />
&#8216;perPage&#8217;    =&gt; 2,<br />
&#8216;delta&#8217;      =&gt; 4,<br />
//&#8217;separator&#8217; =&gt; &#8216;,&#8217;,<br />
&#8216;totalItems&#8217; =&gt; $totalItems,<br />
);<br />
$pager = Pager::factory($pager_options);<br />
echo $pager-&gt;links;<br />
list($from, $to) = $pager-&gt;getOffsetByPageId();<br />
$from = $from &#8211; 1;<br />
$perPage = $pager_options['perPage'];</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sameer</title>
		<link>http://www.codediesel.com/php/simple-pagination-in-php/comment-page-1/#comment-1569</link>
		<dc:creator>sameer</dc:creator>
		<pubDate>Fri, 18 Dec 2009 03:28:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.codediesel.com/?p=118#comment-1569</guid>
		<description>I did not really get your question. The Pager.php is here:

http://pear.php.net/package/Pager/download

Or do you want to look at a demo pagination page?</description>
		<content:encoded><![CDATA[<p>I did not really get your question. The Pager.php is here:</p>
<p><a href="http://pear.php.net/package/Pager/download" rel="nofollow">http://pear.php.net/package/Pager/download</a></p>
<p>Or do you want to look at a demo pagination page?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Benjamin</title>
		<link>http://www.codediesel.com/php/simple-pagination-in-php/comment-page-1/#comment-1568</link>
		<dc:creator>Benjamin</dc:creator>
		<pubDate>Thu, 17 Dec 2009 22:21:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.codediesel.com/?p=118#comment-1568</guid>
		<description>Would you please show me how the &quot;Pager/Pager.php&quot; page looks like... Thank you.</description>
		<content:encoded><![CDATA[<p>Would you please show me how the &#8220;Pager/Pager.php&#8221; page looks like&#8230; Thank you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mike</title>
		<link>http://www.codediesel.com/php/simple-pagination-in-php/comment-page-1/#comment-1507</link>
		<dc:creator>mike</dc:creator>
		<pubDate>Mon, 09 Nov 2009 02:43:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.codediesel.com/?p=118#comment-1507</guid>
		<description>sameer, thanks for this code. it&#039;l help me alot on my project! your site has been bookmarked!</description>
		<content:encoded><![CDATA[<p>sameer, thanks for this code. it&#8217;l help me alot on my project! your site has been bookmarked!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin</title>
		<link>http://www.codediesel.com/php/simple-pagination-in-php/comment-page-1/#comment-1500</link>
		<dc:creator>Martin</dc:creator>
		<pubDate>Sat, 07 Nov 2009 01:39:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.codediesel.com/?p=118#comment-1500</guid>
		<description>excellent tutorial. Thanks</description>
		<content:encoded><![CDATA[<p>excellent tutorial. Thanks</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic page generated in 0.417 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-02-08 12:01:20 -->

