PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 13th, 2000, 04:59 PM
jamnbryan jamnbryan is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Posts: 12 jamnbryan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hello,
Can anyone point me in the direction of a tutorial on URL encoding? I am creating a website and i want to use 1 page which contains the layout, then seperate pages with the content. i would do it something similar to this:

http://website.com/index.php?page=links

Then that would just call up a .inc page specified in the page= variable and display it on index.php.

I am learning php through the internet instead of books, and i already have basic knowledge of how to create stuff, and the syntax i am farmiliar with. So if someone could link me to a page to learn about URL encoding, i would greatly appreciate it.

Thanks,
-Bryan

Reply With Quote
  #2  
Old July 13th, 2000, 10:02 PM
Sepodati's Avatar
Sepodati Sepodati is offline
Banned (not really)
Dev Shed God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 1999
Location: Brussels, Belgium
Posts: 14,628 Sepodati User rank is General 51st Grade (Above 100000 Reputation Level)Sepodati User rank is General 51st Grade (Above 100000 Reputation Level)Sepodati User rank is General 51st Grade (Above 100000 Reputation Level)Sepodati User rank is General 51st Grade (Above 100000 Reputation Level)Sepodati User rank is General 51st Grade (Above 100000 Reputation Level)Sepodati User rank is General 51st Grade (Above 100000 Reputation Level)Sepodati User rank is General 51st Grade (Above 100000 Reputation Level)Sepodati User rank is General 51st Grade (Above 100000 Reputation Level)Sepodati User rank is General 51st Grade (Above 100000 Reputation Level)Sepodati User rank is General 51st Grade (Above 100000 Reputation Level)Sepodati User rank is General 51st Grade (Above 100000 Reputation Level)Sepodati User rank is General 51st Grade (Above 100000 Reputation Level)Sepodati User rank is General 51st Grade (Above 100000 Reputation Level)Sepodati User rank is General 51st Grade (Above 100000 Reputation Level)Sepodati User rank is General 51st Grade (Above 100000 Reputation Level)Sepodati User rank is General 51st Grade (Above 100000 Reputation Level)  Folding Points: 97169 Folding Title: Advanced FolderFolding Points: 97169 Folding Title: Advanced FolderFolding Points: 97169 Folding Title: Advanced FolderFolding Points: 97169 Folding Title: Advanced FolderFolding Points: 97169 Folding Title: Advanced Folder
Time spent in forums: 3 Months 6 Days 2 h 39 m 6 sec
Reputation Power: 4375
Send a message via ICQ to Sepodati Send a message via Yahoo to Sepodati
When you pass a value in the url, php automatically creates that variable and it's value. if you have
http://website.com/index.php?page=links

then on index.php, there will be a variable $page with value "links". in your index.php page you have something like this.

<html>
<body>
<?php
if ($page == "links") { include("link.inc"); }
if ($page == "banners") { include("banners.inc"); }
?>
</body>
</html>

one thing i always say about include files, if you name them with a .inc extension, be sure that your web server is set up to parst .inc files as php. it really won't matter for the include() statements, as the original file is already being parsed, but if someone finds out the name of your include file, links.inc and enteres that into their browser, it'll be sent to them plain text and they'll be able to see your code. another option is to just name your include files with a .php extension. i use "inc_database.php". a last option would be to place your include files outside of your web directory, that way, even if someone finds out the name of your file, it can't be pulled up in a browser becuase it's not in the web directory.

hope that helps..

---John Holmes...

Reply With Quote
  #3  
Old July 13th, 2000, 10:16 PM
jamnbryan jamnbryan is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Posts: 12 jamnbryan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks John. I appreciate your input, but I had unfortunetly figured out url encoding before you replied. What i did was create a php3 file called show.php3 and just had it redirect to the new page depending on the ID. I decided not to do the include thing, because it would mess over my hit counter i made if each page was all on the index.php3 page =]

Thanks again,
-Bryan

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > URL Encoding

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap