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.
form problem
below in the form action, i've put "test.php?w=$sw&h=$sh" but when i input the form i get this..test.php?search=example&submit=searchhow do i get all of this together in the
Install page
How do I make it so when a user submits information on the Install page, it'll right it into the correct file. I can do the forms and $_POST, but I need it so that it actually works.Current stuff in
mr8m - reverse document
Friends,
PHP / MySQL Associative Multidimensional Array:
Hello.I have data in a MySQL Table that adheres to the below: (note, no index, could add if necessary)group~~~~~setting~~~~~value1~~~~~~~~~Babble~~~~~Yeah, sure1~~~~~~~~~Dabble~~~~~No, rather
Edit MySQL Row Using PHP and HTML Form
Hello,Here's what I'm trying to do. Build a page where a user enters a MySQL row number in. Then, a new page appears with an HTML form where the user can edit the information in that row. Like for
UL and LI Add Form
The idea I want here is when the user click on a character name from the drop down select bar at the bottom of the the form under case 1 and hits Add it is supposed to add it as a new LI in the UL
Creating a unique 'control panel' for each user
Hi there,I'm thinking of designing a site that will allow users to sign up and have their own unique 'control panel'.I just need some pointers on the logic behind this design, specifically:How can I
how do I show what a user have selected from a checkbox?
From my code below, how would i show which check boxes have been checked and which radio buttons selected?Code:
Need help-Error istream header declaration
Hi Everyone ,I am having issue with istream declaration. I am new to C programming.can any one please help me ?I am getting error in getNameValuePair.h and getNameValuePair.C code.Here below the
"SEO" URLs
Hey, I'm wondering how to go about creating and using these types of URLs. I'm presuming it's PHP that does this? I see them on Wordpress and Joomla and such but I've been trying to learn exactly how