954,580 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Dynamic Site

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

wimmer
Newbie Poster
7 posts since Oct 2011
Reputation Points: 10
Solved Threads: 0
 

examine mod_rewrite

almostbob
Posting Sensei
3,149 posts since Jan 2009
Reputation Points: 571
Solved Threads: 376
 

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?

evstevemd
Senior Poster
3,713 posts since Jun 2007
Reputation Points: 462
Solved Threads: 392
 

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.

wimmer
Newbie Poster
7 posts since Oct 2011
Reputation Points: 10
Solved Threads: 0
 
index1.php?123


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

diafol
Rhod Gilbert Fan (ardav)
Moderator
7,792 posts since Oct 2006
Reputation Points: 1,170
Solved Threads: 1,080
 

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.

wimmer
Newbie Poster
7 posts since Oct 2011
Reputation Points: 10
Solved Threads: 0
 
almostbob
Posting Sensei
3,149 posts since Jan 2009
Reputation Points: 571
Solved Threads: 376
 

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

wimmer
Newbie Poster
7 posts since Oct 2011
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: