Register Advertise with usHelp Desk Today's Posts Search

Closed Thread
Thread Tools Search this Thread
Unread 10th Feb 2011, 08:19 AM   #1
Success Feels Good
War Room Member
 
rushindo's Avatar
 
Join Date: 2005
Posts: 395
Thanks: 69
Thanked 108 Times in 63 Posts
Default
Can You Dynamically Display Content From a URL?
Share on: 
fb share twitter share gplus share more share

Is there way to dynamically display content on a page based on content in the URL?

For example, say the URL is www.site.com/12345.

If someone clicks that link, can you make the "12345" show up somewhere on the page - dynamically displaying whatever content comes after the forward slash?

Brandon
rushindo is offline  
Unread 10th Feb 2011, 08:41 AM   #2
Success Feels Good
War Room Member
 
rushindo's Avatar
 
Join Date: 2005
Posts: 395
Thanks: 69
Thanked 108 Times in 63 Posts
Default
Re: Can You Dynamically Display Content From a URL?
Share on: 
fb share twitter share gplus share more share

Nevermind, I found how to do it. Just in case anyone else has this question, I found the answer here: Creating Dynamic Pages with php Using the GET Function

Very simple.

Brandon
rushindo is offline  
Unread 10th Feb 2011, 10:48 AM   #3
Peaceful Warrior
War Room Member
 
theIMgeek's Avatar
 
Join Date: 2009
Location: Calgary
Posts: 277
Thanks: 16
Thanked 106 Times in 63 Posts
Default
Re: Can You Dynamically Display Content From a URL?
Share on: 
fb share twitter share gplus share more share

Yup, that's the basics right there.

www.site.com/?number=1234 will be accessible by $_GET['number']

Just so you know, it is also possible to get the same result using a "pretty" link like www.site.com/1234 and still be able to access the value.

That uses something called ReWrite Rules. Many CMS systems such as Wordpress rely on it to make their nicely formatted URLs.

-Ryan

FREE WSO: Protect and Automatically Deliver Your Digital Products

Ask the Internet Marketing Geek
<-- Happy to help with technical challenges
MiniSiteMaker.org <-- Free software to make your mini-sites fast and easy
theIMgeek is offline  
The Following User Says Thank You to theIMgeek For This Useful Post:
Unread 10th Feb 2011, 10:59 AM   #4
Success Feels Good
War Room Member
 
rushindo's Avatar
 
Join Date: 2005
Posts: 395
Thanks: 69
Thanked 108 Times in 63 Posts
Default
Re: Can You Dynamically Display Content From a URL?
Share on: 
fb share twitter share gplus share more share

Thanks Ryan, especially for the ReWrite Rule tip.

Brandon
rushindo is offline  
Unread 10th Feb 2011, 10:35 PM   #5
WebNinja
 
jminkler's Avatar
 
Join Date: 2010
Location: Atlanta GA
Posts: 444
Thanks: 19
Thanked 54 Times in 34 Posts
Default
Re: Can You Dynamically Display Content From a URL?
Share on: 
fb share twitter share gplus share more share

Originally Posted by rushindo View Post

Nevermind, I found how to do it. Just in case anyone else has this question, I found the answer here: Creating Dynamic Pages with php Using the GET Function

Very simple.

Brandon
Right but that's not the same as your original example. $_GET params are after a ? You &quot;could&quot; set up code that does routing etc .. but thats more complex The other *BAD* way to get it is from the $_SERVER variables.
jminkler is offline  
Closed Thread


Bookmarks

Tags
content, display, dynamically, url


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -6. The time now is 10:14 PM.