PHP Coding
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPHP Coding

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 Codewalkers Forums Sponsor:
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here!
  #1  
Old August 27th, 2002, 05:44 AM
madhombre madhombre is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: WI
Posts: 247 madhombre User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
http get vars and spaces

is there an easy why to handle spaces in get var strings?

like blah/script.php?name=this has spaces

what is the best way to deal with this, I looked at html special chars but that looks like the & to $amp etc.

What shopuld I use presumably to make the spaces %20, I could manually do this, I think the reason why it is not processing it like it does on a normal web page is that I am including the file.

Thanks

Reply With Quote
  #2  
Old August 27th, 2002, 05:49 AM
Matt Matt is offline
Moderator
Codewalkers Specialist (4000 - 4499 posts)
 
Join Date: Apr 2007
Location: Florida
Posts: 4,158 Matt User rank is Private First Class (20 - 50 Reputation Level)Matt User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 h 10 m 20 sec
Reputation Power: 6
RE: http get vars and spaces

Use urlencode() and then urldecode() to get it back....

Reply With Quote
  #3  
Old August 27th, 2002, 09:02 PM
madhombre madhombre is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: WI
Posts: 247 madhombre User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: http get vars and spaces

That's the one!!!!

Thanks you

Reply With Quote
  #4  
Old August 27th, 2002, 10:26 PM
madhombre madhombre is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: WI
Posts: 247 madhombre User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: http get vars and spaces

works perfectly, don't even have to mess with them to convert them back, it does it itself!

Thanks for the pointer, I still have lots to learn.

Thanks again

Reply With Quote
  #5  
Old August 27th, 2002, 11:18 PM
zombie zombie is offline
Codewalkers Intermediate (1500 - 1999 posts)
 
Join Date: Apr 2007
Location: serbia
Posts: 1,876 zombie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
RE: http get vars and spaces

justo to note: beside the "%20" encoding of space, u can use "+" to encode space, ie if u write url by hand (and don't generate it from php code):

http://example.com/script.php??query=this+doesnt++or+does+it

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Coding > http get vars and spaces


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 | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway