By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,833 Members | 2,074 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,833 IT Pros & Developers. It's quick & easy.

Post with multiple words to form and Plus Sign

P: n/a
I am attempting to build a primitive search form on my site. It is
searching an Access Database Table and comparing on field in the database to
a field passed from the form. Works great if only one word is keyed in. If
two words are keyed in, it separates them with a plus sign. I have tried
using the split command to parse out the data but that function does not
recognize the plus sign. Any help here? I know some of you folks have
written similar forms, any code examples you would be willing to share?

Thanks in advance,

rh
Jul 19 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
When accessed from the request collection, your form value should not be
url-encoded: ie. if the user entered spaces then the value should also have
spaces, not plus signs.

Show the code you use to access the posted data.

tim
"r0adh0g" <ro*****@nospam.phreaker.net> wrote in message
news:3f**********@news.binaries.net...
I am attempting to build a primitive search form on my site. It is
searching an Access Database Table and comparing on field in the database to a field passed from the form. Works great if only one word is keyed in. If two words are keyed in, it separates them with a plus sign. I have tried
using the split command to parse out the data but that function does not
recognize the plus sign. Any help here? I know some of you folks have
written similar forms, any code examples you would be willing to share?

Thanks in advance,

rh

Jul 19 '05 #2

P: n/a
Yeh use split if you wanna separate the words. But use " " instead of "+"

i.e. split(string," ")

"Tim Williams" <saxifrax@pacbell*dot*net> wrote in message
news:%2******************@TK2MSFTNGP10.phx.gbl...
When accessed from the request collection, your form value should not be
url-encoded: ie. if the user entered spaces then the value should also have spaces, not plus signs.

Show the code you use to access the posted data.

tim
"r0adh0g" <ro*****@nospam.phreaker.net> wrote in message
news:3f**********@news.binaries.net...
I am attempting to build a primitive search form on my site. It is
searching an Access Database Table and comparing on field in the database
to
a field passed from the form. Works great if only one word is keyed in.

If
two words are keyed in, it separates them with a plus sign. I have

tried using the split command to parse out the data but that function does not
recognize the plus sign. Any help here? I know some of you folks have
written similar forms, any code examples you would be willing to share?

Thanks in advance,

rh


Jul 19 '05 #3

P: n/a
Thank you that worked like a charm. Any reason that asp recognizes the "+"
sign as a space?

Just Curious!

rh

"Andrew Paton" <an**********@nospamplease.nufsaid.net> wrote in message
news:uw**************@tk2msftngp13.phx.gbl...
Yeh use split if you wanna separate the words. But use " " instead of "+"

i.e. split(string," ")

"Tim Williams" <saxifrax@pacbell*dot*net> wrote in message
news:%2******************@TK2MSFTNGP10.phx.gbl...
When accessed from the request collection, your form value should not be
url-encoded: ie. if the user entered spaces then the value should also

have
spaces, not plus signs.

Show the code you use to access the posted data.

tim
"r0adh0g" <ro*****@nospam.phreaker.net> wrote in message
news:3f**********@news.binaries.net...
I am attempting to build a primitive search form on my site. It is
searching an Access Database Table and comparing on field in the database
to
a field passed from the form. Works great if only one word is keyed in.
If
two words are keyed in, it separates them with a plus sign. I have

tried using the split command to parse out the data but that function does

not recognize the plus sign. Any help here? I know some of you folks have written similar forms, any code examples you would be willing to share?
Thanks in advance,

rh



Jul 19 '05 #4

P: n/a
> Any reason that asp recognizes the "+"
sign as a space?


It doesn't the "+" sign was never there.

It is the way that the post method works - it substitutes spaces for '+',
simmilary i think the get method uses '%'.

However when you call it back into the script using the reqeust method all +
& % will be removed and replaced for blank spaces.

:-)
Jul 19 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.