|
Posted by Jukka K. Korpela on 11/21/06 06:39
Scripsit chinese.central@googlemail.com:
> I have got a form, it has a text field, I type in ;-delimited data,
The ";" will be % encoded, and so will any other reserved characters, such
as "=".
> is there a way that I can parse the data such that the URL will look like
>
> .php?field1=xxx,field1_hidden=xxx,field2=xxx,field2_hidden=xxx
_You_ don't "parse" the data. The browser will "parse" (actually, just
process, % encode) it when constructing the form data set. If the user
types, say,
foo=bar;zap=zap
into a field named "q", then (assuming method="GET") the URL that the
browser constructs will have a query part with
?q=foo%3Dbar%3Bzap%3Dzap
You have to take it from there. Any normal form data processing on the
server will start with dividing the query part into name=value fields,
followed by % decoding, through some library routine, turning %3D to "=" and
%3B to ";". Then you can simply parse that. You cannot and you need not
parse the data to make the _URL_ look something particular. The URL is your
input data, not output.
--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/
[Back to original message]
|