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



Go Back   Dev Articles Community ForumsProgrammingPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old January 10th, 2005, 06:41 PM
wxyzphp wxyzphp is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 3 wxyzphp User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
$_Get can't retrieve + or /

hi,
I don't know how to retrieve special character like +, / etc from the URL using $_Get. I just get empty when retrieving that.
e.g http://www.sit.com/firstpage.php? thread=what I want + what I get

I am getting : http://www.sit.com/firstpage.php?thread=what I want what I get

I appreciate if someone can help.

thax,
wxyz

Reply With Quote
  #2  
Old January 11th, 2005, 07:09 AM
kode_monkey kode_monkey is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 367 kode_monkey User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 m 21 sec
Reputation Power: 15
This should sort you out -

http://uk.php.net/manual/en/function.urlencode.php

-KM-

Reply With Quote
  #3  
Old January 12th, 2005, 08:26 AM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,886 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 19 m 35 sec
Reputation Power: 18
You have:
http://www.sit.com/firstpage.php?thread=what I want what I get

However the browser typically encodes it as follows:
http://www.sit.com/firstpage.php?thread=what+I+want+what+I+get

PHP would then read the input string and decode the url:
$_GET['thread'] = 'what I want what I get'

If you want the '+' symbols being passed, as kode_monkey stated prior, you should make use of the urlencode function

<a href="page.php?t=<?=urlencode('This+will+have+pluses');?>">click here</a>

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingPHP Development > $_Get can't retrieve + or /


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 - 2018, Jelsoft Enterprises Ltd.

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