PHP Server Side...

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
shoxlx
Forum Newbie
Posts: 23
Joined: Tue Oct 11, 2005 10:42 pm

PHP Server Side...

Post by shoxlx »

Is there a php server-side code or function to automatically remove spaces from a http link...

:arrow: ex... someone types in their address bar: http://shoxlx.com/whatever/index.php?name=John Smith
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

urlencode() the input.
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

Wait... sorry... I didn't read the question very well... nvm. I don't think you can do what you asked. Why would somebody type in their own query string?
shoxlx
Forum Newbie
Posts: 23
Joined: Tue Oct 11, 2005 10:42 pm

Post by shoxlx »

You would be givin a url string... then put it as a link in ur aim profile
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

If you're giving them the link, why don't you just encode the query string yourself? with urlencode()
Post Reply