Thread: Next link not working
Results 1 to 7 of 7
Related
-
Not working in IE Forum: HTML Forum
Replies: 2 -
PHP form- not working Forum: PHP Forum
Replies: 12 -
Z-Index not working with IE. Forum: Myspace Forum
Replies: 1 -
Why isn't this working? Forum: HTML Forum
Replies: 5 -
It's 3:00 AM here and I'm working the ..... Forum: General Discussion
Replies: 47
-
10-10-2003, 11:02 PM #1
Next link not working
I am working on the hosting directory and am having a problem with the pagination. Everything is working except that the next link does not appear. http://www.ahfb2000.com/hostindex.php
PHP Code:print "<p align='center'>";
if($page != 1){
$pageprev = $page - 1;
echo("<a href=\"$PHP_SELF?$qstring&page=$pageprev\">PREV</a> ");
}else
echo("PREV ");
$numofpages = $numrows / $limit;
for($i = 1; $i <= $numofpages; $i++){
if($i == $page)
echo($i." ");
else
echo("<a href=\"$PHP_SELF?$qstring&page=$i\">$i</a> ");
}
if(($numrows % $limit) != 0){
if($i == $page)
echo($i." ");
else
echo("<a href=\"$PHP_SELF?$qstring&page=$i\">$i</a> ");
if(($numrows - ($limit * $page)) > 0){
$pagenext = $page + 1;
echo("<a href=\"$PHP_SELF?$qstring&page=$pagenext\">NEXT</a>");
}else
echo(" NEXT ");
mysql_free_result($result);
}
}
print "</p>";
PHP Code:if(($numrows - ($limit * $page)) > 0){
$pagenext = $page + 1;
Btw, take a look at the page layout. I just got done incorporating the welcome panel and am currently working on making every page compliant to XHTML 1.0 transitional. A major spring cleaning with a white glove, see ya next year
DaveLast edited by HTML; 03-23-2009 at 04:07 PM.
-
10-11-2003, 08:23 AM #2
I dont know if this is the problem, but try changing -
PHP Code:echo("<a href=\"$PHP_SELF?$qstring&page=$pagenext\">NEXT</a>");
}else
echo(" NEXT ");
PHP Code:echo("<a href=\"$PHP_SELF?$qstring&page=$pagenext\">NEXT</a>");
} else {
echo(" NEXT ");
If one of our members helps you, please click theicon to add to their reputation!
No support via email or private message - use the forums!
Before you ask, have you Searched?
-
10-11-2003, 09:05 AM #3
Nope, that breaks it so I put in another closing bracket and I still get nothing.
Dave
-
10-11-2003, 12:50 PM #4
The only thing I can think of it going thru all the 'if' statements, and making sure they are all closed properly, ie
PHP Code:if (action)
{
do this
} else {
do that
}
If one of our members helps you, please click theicon to add to their reputation!
No support via email or private message - use the forums!
Before you ask, have you Searched?
-
10-11-2003, 12:51 PM #5
-
10-11-2003, 12:53 PM #6
Here is the corrected code
PHP Code:print "<p align='center'>";
if($page != 1){
$pageprev = $page - 1;
echo("<a href=\"$PHP_SELF?$qstring&page=$pageprev\">PREV</a> ");
}else {
echo("PREV ");
}
$numofpages = $numrows / $limit;
for($i = 1; $i <= $numofpages; $i++){
if($i == $page) {
echo($i." ");
}else{
echo("<a href=\"$PHP_SELF?$qstring&page=$i\">$i</a> ");
}
if(($numrows % $limit) != 0){
if($i == $page)
echo($i." ");
else
echo("<a href=\"$PHP_SELF?$qstring&page=$i\">$i</a> ");
}
}
if(($numrows - ($limit * $page)) > 0){
$pagenext = $page + 1;
echo("<a href=\"$PHP_SELF?$qstring&page=$pagenext\">NEXT</a>");
}else{
echo(" NEXT ");
mysql_free_result($result);
}
}
print "</p>";
-
10-11-2003, 02:02 PM #7
I ran into another problem, whenever 5 or more pages were needed the page numbers doubled up
grrrrrrr fix removed lolLast edited by HTML; 10-11-2003 at 02:07 PM.
Cloudjiffy- PaaS for Developers
10-05-2020, 12:30 AM in Web Hosting Forum