Hello,
I have following code which works great for pagination. but i have small issue now.
Now the output is coming like this
Quotemypage.php?page=2
I want it like this
Quotemypage.php/2
code-
Code: $numrows = 100;
//$numrows = $row['numrows'];
//echo "$row[numrows]";
// how many pages we have when using paging?
$maxPage = ceil($numrows/$rowsPerPage);
echo "$maxPage";
$self = 'mypage.php';
// creating 'previous' and 'next' link
// plus 'first page' and 'last page' link
// print 'previous' link only if we're not
// on page one
$Nav="";
If($pageNum > 1) {
$Nav .= "<a class='nav' href="$self?page=" . ($pageNum-1) . " "><< Prev</a>";
}
/*For($i = 1 ; $i <= $maxPage ; $i++) {
If($i == $pageNum) {
$Nav .= "<b>$i</b>";
}Else{
$Nav .= "<a class='nav' href="$self?page=" . $i . "">$i</a>";
}
}*/
If($i == $pageNum)
{
$Nav .= "<p class='page'>1</p>";
}
Else
{
$page1=$pageNum-1;
if($page1==0){}
else
{
$Nav .= "<p class='pagination'><a href="$self?page=" . $page1. "">$page1</a></p>";
}
$Nav .= "<p class='page'>$pageNum</p>";
$page2=$pageNum+1;
if($page2<=$maxPage)
{
$Nav .= "<p class='pagination'><a href="$self?page=" . $page2. "">$page2</a></p>";
}
else{
}
}
If($pageNum < $maxPage) {
$Nav .= "<a class='nav' href="$self?page=" . ($pageNum+1) . "">Next >></a>";
}
Echo "
" . $Nav;
/* for showing all rows
$Nav="";
If($pageNum > 1) {
$Nav .= "<a class='nav' href="$self?page=" . ($pageNum-1) . " "><< Prev</a>";
}
For($i = 1 ; $i <= $maxPage ; $i++) {
If($i == $pageNum) {
$Nav .= "<b>$i</b>";
}Else{
$Nav .= "<a class='nav' href="$self?page=" . $i . "">$i</a>";
}
}
If($pageNum < $maxPage) {
$Nav .= "<a class='nav' href="$self?page=" . ($pageNum+1) . "">Next >></a>";
}
Echo "
" . $Nav;
*/
/*$Nav="";
if ($pageNum > 1)
{
$page = $pageNum - 1;
$Nav = " <a href="$self?page=$page">|Prev|</a> ";
$Nav = " <a href="$self?page=1">|<<</a> ";
//echo "$first";
}
else
{
$Nav = ' |Prev| '; // we're on page one, don't enable 'previous' link
$Nav = ' |<< '; // nor 'first page' link
}
// print 'next' link only if we're not
// on the last page
echo "$pageNum";
if ($pageNum < $maxPage)
{
$page = $pageNum + 1;
$Nav = " <a href="$self?page=$page">|Next|</a> ";
$Nav = " <a href="$self?page=$maxPage">>>|</a> ";
}
else
{
$Nav = ' |Next| '; // we're on the last page, don't enable 'next' link
$Nav = ' >>| '; // nor 'last page' link
}
Echo "
" . $Nav;*/
can anyone please tell me how can i achieve that?
Thanks in advance.
cyrillic string conversion question
Hello,
Error when call dll from oracle
Hi all, please help me!
split values
I have values that are returned to me in this format:name=>test,age=>49What I want to get out of this is an array like thisarray('name'=>'test','age'=>'49');I was hoping
date function help
i need help with date functionCode: [Select]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
Revoking alter any table from a schema
Hi All,
help with mysql_error()
Hi,I am trying to insert data into a table, but I am not able to insert it. I wanted to see what the error was using mysql_error() function, but it does not return any error string for me. I have
Drawing Images in classes
I'm quite new to Object Oriented PHP. What I'm trying to do is draw some images but also have other content on the page.Code: include('images.php');//New Image set$im=new images();//Sends headers and
PHP Game
hy i was wondering what's the best method in order to make some automatic updates in a php gamelet's say that the user should gain 1gold each minute but the user is not logged in and the process is
writing a screen scraper
Hello,I'm writing a screen scraper application and want to be able to get absolute addresses for images from relative links.So a link like this: Code: <img
HeaderSelectedCssClass not working
I have an accordian where I have a drop down list in the first pane and a grid in the second pane. When the ddl selection is changed, I programatically change the selected index of the accordian to