Hi,
- In my (Java)program I read a POST-request from a Web-client over a socket
and might pass this request to a PHP/cgi-Modul, to get PHP's generated
HTML-stream.
The request comes in parts as follows:
..
..
-----------------------------7d42241a0302
Content-Disposition: form-data; name="sql_query "
select * from dir
-----------------------------7d42241a0302
Content-Disposition: form-data; name="show_quer y"
1
-----------------------------7d42241a0302
Content-Disposition: form-data; name="sql_file" ; filename=""
Content-Type: application/octet-stream
-----------------------------7d42241a0302
..
..
- I copy the parameter-names and the values and pass them to PHP. This
works fine except the following case (with another request):
..
..
-----------------------------7d4f01b15038c
Content-Disposition: form-data; name="sql_query "
-----------------------------7d4f01b15038c
Content-Disposition: form-data; name="show_quer y"
1
-----------------------------7d4f01b15038c
Content-Disposition: form-data; name="sql_file" ; filename="C:\sr c\selfile.sql"
Content-Type: text/plain
select * from dir
-----------------------------7d4f01b15038c
..
..
- The difference is, the formular contains a field "<input type=file ...>"
that the user has filled in and therefore the client-browser reads the
parameter-value from a file and embeds it into the request. Now my questions:
How to pass the (selfile.sql)da ta to PHP/cgi ?
How to let know PHP to which parameter-name the data are related to ?
I could assign the value to "sql_query" , but this is no common solution.
Best regards Siggi
- In my (Java)program I read a POST-request from a Web-client over a socket
and might pass this request to a PHP/cgi-Modul, to get PHP's generated
HTML-stream.
The request comes in parts as follows:
..
..
-----------------------------7d42241a0302
Content-Disposition: form-data; name="sql_query "
select * from dir
-----------------------------7d42241a0302
Content-Disposition: form-data; name="show_quer y"
1
-----------------------------7d42241a0302
Content-Disposition: form-data; name="sql_file" ; filename=""
Content-Type: application/octet-stream
-----------------------------7d42241a0302
..
..
- I copy the parameter-names and the values and pass them to PHP. This
works fine except the following case (with another request):
..
..
-----------------------------7d4f01b15038c
Content-Disposition: form-data; name="sql_query "
-----------------------------7d4f01b15038c
Content-Disposition: form-data; name="show_quer y"
1
-----------------------------7d4f01b15038c
Content-Disposition: form-data; name="sql_file" ; filename="C:\sr c\selfile.sql"
Content-Type: text/plain
select * from dir
-----------------------------7d4f01b15038c
..
..
- The difference is, the formular contains a field "<input type=file ...>"
that the user has filled in and therefore the client-browser reads the
parameter-value from a file and embeds it into the request. Now my questions:
How to pass the (selfile.sql)da ta to PHP/cgi ?
How to let know PHP to which parameter-name the data are related to ?
I could assign the value to "sql_query" , but this is no common solution.
Best regards Siggi