0

I am a newbie with php and was hoping someone can help me out. I am creating my first dynamic site in php and have gotten stuck. I have one page with 100's of links. I need all these links to load the same page but I need the server to load it so that it is a different URL.

Example:

link - clicks through to index1.php?123
link - clicks through to index1.php?456
link - clicks through to index1.php?789

Thanks

4
Contributors
7
Replies
8
Views
5 Years
Discussion Span
Last Post by wimmer
0

I am a newbie with php and was hoping someone can help me out. I am creating my first dynamic site in php and have gotten stuck. I have one page with 100's of links. I need all these links to load the same page but I need the server to load it so that it is a different URL.

Example:

link - clicks through to index1.php?123
link - clicks through to index1.php?456
link - clicks through to index1.php?789

Thanks

Mh! and what have you done so far?

0

I am pretty much done with the site. I am just stuck on how to have many links go to the same page template with using a different URL for every page. I will look into mod-rewrite. If any one has any ideas on how to do this it would be much appreciated.

0
index1.php?123

WHat does that mean? I thought querystring parameters had a parameter=value format.

0

Ok after doing a lot more research let me try to ask this in a different way. I think what i need to do is write a query string in URLs in php but have no idea where to begin. I have one index page with many links. All these links go to the same subindex page. The subindex page will need a unique URL for each link on the index page.

Ex.

index page links:

http://www.mysite.com/example1
http://www.mysite.com/example2
http://www.mysite.com/example3

When a user clicks on example1 it takes them to

http://www.mysite.com/example1/sample.php?id=

When a user clicks on example2 it takes them to

http://www.mysite.com/example1/sample.php?id=

I hope this makes more sense.

0

Thanks almostbob! Do you know of an easier way I could look into doing this and get the same results rather than going through 1000's of links and adding

.php?id=1
.php?id=2
.php?id=3
.php?id=4

and so on... to the end of all my links? much appreciated

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.