Links With Spaces Don't Work

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
User avatar
JustinMs66
Forum Contributor
Posts: 127
Joined: Sun Sep 03, 2006 4:18 pm

Links With Spaces Don't Work

Post by JustinMs66 »

i have a working upload script, but whenever you try to upload anything with a space, the link won't work. i mean, it does work, and if u type it in manually it works, but the link that is echo'd after the upload:

here is the link to your Image: number one.jpg
(and the link for "number one.jpg is: "http://www.csscobalt.com/uploads/number")

dosn't work, because it just take the first word if it has spaces. it does:
"http://www.csscobalt.com/uploads/number"
instead of
"http://www.csscobalt.com/uploads/number one.jpg"

but the wierd thing, is that the text will say, "here is the link for number one.jpg" and it works their, just not for when it does the link!

anway, here is my PHP code:
http://www.csscobalt.com/uploads/upload_php.txt

how can i fix this?
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Post by s.dot »

have a look at urlencode()
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

JustinMs66, since you've decided to ignore my private message, here's a public one.

It is suggested that you, everyone, refrain from using aolspeak in posts. Examples of this are u, ur, ne1, any1 and wot. Instead we should use the proper words for such trivial spellings. Why? Because there are many people that read, let alone, post from many countries. They do not always speak English as well as some of us, nor do they know these aberrant abbreviations. Therefore, we strongly suggest using as few abbreviations, especially those of such simple words, as possible.

Additionally, "HELP!!!!!!!! !!!!!!!" isn't helpful in determining what your problem may be related to before reading your thread. This may affect who reads your thread, thus reducing the number of people willing to respond. Plus there's this rule:
[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:2. Use descriptive subjects when you start a new thread. Vague titles such as "Help!", "Why?" are misleading and keep you from receiving an answer to your question.
Something to think about.

Thanks, the moderators.
User avatar
JustinMs66
Forum Contributor
Posts: 127
Joined: Sun Sep 03, 2006 4:18 pm

Post by JustinMs66 »

k gotcha. i won't do that n e more.

but that code won't really work 4 me, can u explain more plz?
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

JustinMs66 wrote:k gotcha. i won't do that n e more.

but that code won't really work 4 me, can u explain more plz?
Are you serious, or is this a joke?
Post Reply