Welcome Guest, Not a member yet? Register   Sign In
I want to post value on pagination
#1

[eluser]Unknown[/eluser]
Hello Friends,

I want to pass my value in post when i use pagination. Normally in CI when we use pagination at that time we use anchor tag which not pass value in post. But here it is my requirement. So, kindly explain me if it possible to pass value in post anyway.


Waiting for your reply.. Thanks
#2

[eluser]xwero[/eluser]
The pagination library is used to generate links, if you want to post the offsets the only way i can think of is using buttons.

You can try my pagination plugin. It has a view file you have to define and that view file can look like this
Code:
<form action="" method="post">
<ul>
<li>&lt;input type="submit" name="page_&lt;?php echo $first ?&gt;" value="&lt;?php echo $first ?&gt;"&gt;&lt;/li>&lt;?php if(isset($prev)): ?&gt;
<li>&lt;input type="submit" name="page_&lt;?php echo $prev ?&gt;" value="&lt;?php echo $prev ?&gt;"&gt;&lt;/li>&lt;?php endif; if(isset($missing_prev)): ?&gt;
<li>...</li>&lt;?php endif; foreach($pages as $page): if($page != $currentPage): ?&gt;
<li>&lt;input type="submit" name="page_&lt;?php echo $page ?&gt;" value="&lt;?php echo $page ?&gt;"&gt;&lt;/li>&lt;?php else: ?&gt;
<li>&lt;?php echo $page ?&gt;</li>&lt;?php endif; endforeach; if(isset($missing_next)): ?&gt;
<li>...</li>&lt;?php endif; if(isset($next)): ?&gt;
<li>&lt;input type="submit" name="page_&lt;?php echo $next ?&gt;" value="&lt;?php echo $next ?&gt;"&gt;&lt;/li>&lt;?php endif ?&gt;
<li>&lt;input type="submit" name="page_&lt;?php echo $last ?&gt;" value="&lt;?php echo $last ?&gt;"&gt;&lt;/li>
</ul>
&lt;/form&gt;




Theme © iAndrew 2016 - Forum software by © MyBB