![]() |
Pagination
So i know this has been asked a billion times (maybe a trillion but idk), but i tried google, tutorial sites, the search feature here and nothing seems to be working for me i keep getting errors or its not what i need so here i come asking for help again.
I have this to display my data as it is designed to function as a forum but im calling it 'admin notes' in my script. PHP Code:
My database looks like this: DB NAME = staff TABLE NAME = adminforum_question ROWS = id, topic, message, name, datetime, priority, category Every tutorial i read kept giving me errors and i got frustrated figuring it out so. Any help is appreciated. |
You should take a look at this, i know some people who this has helped very much including me, also it's basic + it's a video it's great. Check it out if you don't understand it, let us know but watch it at least 2,3 times.. it takes a while for it to sink in to the head/brain but it will as everything does ;)
PHP Pagination - Part 1 -Cf |
Thanks abunch mate! worked perfectly while making me laugh at the same time. Did everything i needed just on part 1 not sure if part 2 does anything more but im going to watch it. thanks.
|
np mate ;)
|
Alright read that got a question:
I am trying to make it display all page numbers without doing the "..." things and I cant seem to figure out how I would go about doing that lol. My code is pretty much exactly the same as his, but his code seems quite messy in my opinion. Any thoughts? PHP Code:
![]() |
|
Randy: just take out the echo "... ";
knight13: i am glad that it helped ;) |
I figured that but there is a problem because those echo's don't even seem to show up... i just get the 'Page 1 of 3' nothing else works.
|
You should take a look at Tanax's Pagination class as well..
|
Watched it for the 5th time and i did my styling while following along instead of after and its working, i guess i was just getting confused with his coding style mixed with mine.
SCREENSHOT OF MY WORK |
I may be wrong so dont quote me on it but i believe that is a basic php function where it reads something in the url. i know its a long shot but its all i got.
|
nah the $_GET[''] gets something from the url if its not defined by a form, but i believe 'page' is what retrieves a number from the end.
|
from the url but here is what your looking for:
Your URL is like this correct: index.php?page=9 by putting $_GET['page'] you are telling it to put page there so change page to whatever you want to be there such as id, number, etc.. and then it reads the number after page=. |
no problem lol honestly took me about 15 mins reading that line over and over to figure it out, sorry if its not the exact explanation your looking for, im not the best at explaining so I did best I could.
|
Quote:
|
| All times are GMT. The time now is 05:51 AM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0