Page 1 of 1

Links With Spaces Don't Work

Posted: Tue Sep 12, 2006 12:09 am
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?

Posted: Tue Sep 12, 2006 12:46 am
by s.dot
have a look at urlencode()

Posted: Tue Sep 12, 2006 6:52 am
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.

Posted: Tue Sep 12, 2006 1:14 pm
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?

Posted: Tue Sep 12, 2006 1:26 pm
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?