Jump to content

Help with pagination!


pappakaka

Recommended Posts

Hi, I have a problem with pagination.

 

This is my site: http://www.randommovietitle.com/

 

When you click random you get to a new page (called movies.php) wich displays random content taken from a mysql database. When you click Randomize Again, the same thing happends and so on. What I need is so that every page has it's own URL like this somehow:

 

What it looks like now:

 

Content about the movie Titanic is loaded:

http://www.randommovietitle.com/movies.php

 

Content about the movie Avatar is loaded:

http://www.randommovietitle.com/movies.php

 

What I need it to look like:

 

Content about the movie Titanic is loaded:

http://www.randommovietitle.com/movies.php?mid=xxxxxx

 

Content about the movie Avatar is loaded:

http://www.randommovietitle.com/movies.php?mid=xxxxxx

 

I know you can do this but just don't know how? Please help?

Link to comment
Share on other sites

What I mean is like on the forum. When you post a new thread it get it's own URL like this:

http://www.phpfreaks.com/forums/index.php?topic=335006.0

 

See, it adds a few lines to the URL so you can go to this page directly!

 

I checked the code but it can't be a $_POST or $_GET problem as I'm not doing anything to make the URL specific for the page.

Link to comment
Share on other sites

just place another page in between. (I'll call it jump.php just for this example)

 

every time you hit the 'random' button, send people to jump.php, that reads database, extracts random movie id and then redirects to movie.php?mid=xxxx

 

in movie.php you use the $_GET['mid'] value to display the actual movie.

 

this way every movie shown has a different url that can be bookmarked or sent to friends via email.

 

 

hope this helps.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.