hey ppl
how is everything
okay , i want ask if i can create a next page automatically by using mysql??
i mean is there is any code that can check for the next page after it displays the previous one .
it is somehow comp[licated for me to explain
i mean , after i displayed a post from mysql table with the title post 1 can i write a code that automatically check for post 2 and post 3 and displays the number of pages that are available and their id's and liks to them so that it become an automatic process
please try to understand me
i really need to know if i can do something like this and please if it is posible give me the code that does this function .

Recommended Answers

All 6 Replies

It sounds like you need ajax

can ajax do this ????

With ajax even after a page is loaded you can run php script without reloading the page. You are a little vague on what you want to do. Can you try and explain it better. Maybe attach some code.

okay . thanks
did you see the w3schools tutorial pages ??
they give the page and bellow as well as the top there is a link to next page and the previous page right ??
so my question can we create the same in php . couz w3schools website is in asp . and if we can do the same can we make it automatic process . i mean the php code looks for the next page and the previous page automaticly without adding thoses links manully .
i hope now it is more clear

Use a database to save your posts or pages if you select the current page then just get the prev and next one at the same time "Select * from pages where id in (id -1,id,id+1)"

then just display id-1 link at the top en id+1 at the bottem

What Henzard says is very true, a litle note is you don't need AJAX for this, it can be done perfectly in simple PHP and mysql

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.