Redirect/defining links

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Mader
Forum Newbie
Posts: 1
Joined: Sat Aug 28, 2010 10:29 am

Redirect/defining links

Post by Mader »

Hello, I am quite new to php.
I have question about pages and their redirection (I'll explain).
I'd like to achieve something like on http://wimp.com
When you click on any link of a video there you will be redirected to (probably) new page with name of title of the video.
I am curious about how they make these "new" pages with videos, I doubt they make everyday 6 new XXX.php files and uploading them on their server.

Lets say I have database with 1 table - X collumns (id,name,city,number,age etc.).
I have homepage "index.php" where is the list of all names from my database (eg. 1000).
When I click on some name, I want to be redirected to a "new" page with detailed info about this person.

Code: Select all

<a href="???">Joe</a>
<a href="???">Jack</a>
<a href="???">John</a>
.
.
What is supposted to be in HREF ?? How to display these pages without creating 1000 .php/.html files??

I hope you understood what is my problem. / sorry for english

ps: I am not asking about .htaccess and its functions.
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: Redirect/defining links

Post by Celauran »

Mader wrote:Lets say I have database with 1 table - X collumns (id,name,city,number,age etc.).
I have homepage "index.php" where is the list of all names from my database (eg. 1000).
When I click on some name, I want to be redirected to a "new" page with detailed info about this person.
Probably the easiest solution is to have a single page, call it contact.php or somesuch, and use a form to pass the desired user's ID to contact.php, which will then retrieve whatever information you need about that user.
Post Reply