473,385 Members | 2,013 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Auto submitting a form that contains a file field

Hi,

I'm using php 5. Does anyone have any code or a function that auto
submits a form that contains a single INPUT, of type = file?

Thanks, - Dave
Mar 31 '08 #1
10 2131
la***********@zipmail.com wrote:
Hi,

I'm using php 5. Does anyone have any code or a function that auto
submits a form that contains a single INPUT, of type = file?

Thanks, - Dave
Nope. Can't do it with PHP. PHP is server side, and you need client side.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Apr 1 '08 #2
On Mar 31, 10:15*pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
laredotorn...@zipmail.com wrote:
Hi,
I'm using php 5. *Does anyone have any code or a function that auto
submits a form that contains a single INPUT, of type = file?
Thanks, - Dave

Nope. *Can't do it with PHP. *PHP is server side, and you need client side.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attglobal.net
==================
Actually this would be a server side function that POSTs to a URL and
the enctype would be "multipart/form-data". I've found tons of stuff
that auto-submit forms where you can put the parameters in a query
string, but with inputs that are of file types, you can't do that ...
or can you?

- Dave
Apr 1 '08 #3
Hey Dave,

Do you really need it to be input=file? can't you just load the file,
base64_encode it and send it through an input=text?

Or another method would be making the script with the form in one file
and then using CURL to post that script and posting the file through
CURL. Should work.
On Apr 1, 7:05 am, "laredotorn...@zipmail.com"
<laredotorn...@zipmail.comwrote:
On Mar 31, 10:15 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
laredotorn...@zipmail.com wrote:
Hi,
I'm using php 5. Does anyone have any code or a function that auto
submits a form that contains a single INPUT, of type = file?
Thanks, - Dave
Nope. Can't do it with PHP. PHP is server side, and you need client side.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attglobal.net
==================

Actually this would be a server side function that POSTs to a URL and
the enctype would be "multipart/form-data". I've found tons of stuff
that auto-submit forms where you can put the parameters in a query
string, but with inputs that are of file types, you can't do that ...
or can you?

- Dave
Apr 1 '08 #4
la***********@zipmail.com wrote:
On Mar 31, 10:15 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
>laredotorn...@zipmail.com wrote:
>>Hi,
I'm using php 5. Does anyone have any code or a function that auto
submits a form that contains a single INPUT, of type = file?
Thanks, - Dave
Nope. Can't do it with PHP. PHP is server side, and you need client side.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attglobal.net
==================

Actually this would be a server side function that POSTs to a URL and
the enctype would be "multipart/form-data". I've found tons of stuff
that auto-submit forms where you can put the parameters in a query
string, but with inputs that are of file types, you can't do that ...
or can you?

- Dave
No, the POST is from the client end. The result of the POST is server end.

Client end is NOT php. Neither is the enctype nor the <input type=file tag.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Apr 1 '08 #5
On Apr 1, 2:05 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
laredotorn...@zipmail.com wrote:
On Mar 31, 10:15 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
laredotorn...@zipmail.com wrote:
Hi,
I'm using php 5. Does anyone have any code or a function that auto
submits a form that contains a single INPUT, of type = file?
Thanks, - Dave
Nope. Can't do it with PHP. PHP is server side, and you need client side.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attglobal.net
==================
Actually this would be a server side function that POSTs to a URL and
the enctype would be "multipart/form-data". I've found tons of stuff
that auto-submit forms where you can put the parameters in a query
string, but with inputs that are of file types, you can't do that ...
or can you?
- Dave

No, the POST is from the client end. The result of the POST is server end.

Client end is NOT php. Neither is the enctype nor the <input type=file tag.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attglobal.net
==================
From what he's saying I'd think he tries to make an auto-poster to do
posts in another website's form or a form located in another script,
and that si doable using PHP.
Apr 1 '08 #6
George Maicovschi wrote:
On Apr 1, 2:05 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
>laredotorn...@zipmail.com wrote:
>>On Mar 31, 10:15 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
laredotorn...@zipmail.com wrote:
Hi,
I'm using php 5. Does anyone have any code or a function that auto
submits a form that contains a single INPUT, of type = file?
Thanks, - Dave
Nope. Can't do it with PHP. PHP is server side, and you need client side.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attglobal.net
==================
Actually this would be a server side function that POSTs to a URL and
the enctype would be "multipart/form-data". I've found tons of stuff
that auto-submit forms where you can put the parameters in a query
string, but with inputs that are of file types, you can't do that ...
or can you?
- Dave
No, the POST is from the client end. The result of the POST is server end.

Client end is NOT php. Neither is the enctype nor the <input type=file tag.

From what he's saying I'd think he tries to make an auto-poster to do
posts in another website's form or a form located in another script,
and that si doable using PHP.
No, I read it as he's trying to automatically submit a form from the
browser. But it really isn't clear.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Apr 1 '08 #7
On Apr 1, 6:49*am, George Maicovschi <georgemaicovs...@gmail.com>
wrote:
On Apr 1, 2:05 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:


laredotorn...@zipmail.com wrote:
On Mar 31, 10:15 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
>laredotorn...@zipmail.com wrote:
>>Hi,
>>I'm using php 5. *Does anyone have any code or a function that auto
>>submits a form that contains a single INPUT, of type = file?
>>Thanks, - Dave
>Nope. *Can't do it with PHP. *PHP is server side, and you need client side.
>--
>==================
>Remove the "x" from my email address
>Jerry Stuckle
>JDS Computer Training Corp.
>jstuck...@attglobal.net
>==================
Actually this would be a server side function that POSTs to a URL and
the enctype would be "multipart/form-data". *I've found tons of stuff
that auto-submit forms where you can put the parameters in a query
string, but with inputs that are of file types, you can't do that ...
or can you?
*- Dave
No, the POST is from the client end. *The result of the POST is serverend.
Client end is NOT php. *Neither is the enctype nor the <input type=file tag.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attglobal.net
==================

From what he's saying I'd think he tries to make an auto-poster to do
posts in another website's form or a form located in another script,
and that si doable using PHP.- Hide quoted text -

- Show quoted text -
Hi, George interpreted my question correctly. George (and anyone
else), regarding your question
Do you really need it to be input=file? can't you just load the file, base64_encode it
I guess it doesn't have to be input=file. But when you say "load the
file", what do you mean? Thanks, - Dave
Apr 1 '08 #8
On Apr 1, 10:15 pm, "laredotorn...@zipmail.com"
<laredotorn...@zipmail.comwrote:
On Apr 1, 6:49 am, George Maicovschi <georgemaicovs...@gmail.com>
wrote:
On Apr 1, 2:05 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
laredotorn...@zipmail.com wrote:
On Mar 31, 10:15 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
laredotorn...@zipmail.com wrote:
>Hi,
>I'm using php 5. Does anyone have any code or a function that auto
>submits a form that contains a single INPUT, of type = file?
>Thanks, - Dave
Nope. Can't do it with PHP. PHP is server side, and you need client side.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attglobal.net
==================
Actually this would be a server side function that POSTs to a URL and
the enctype would be "multipart/form-data". I've found tons of stuff
that auto-submit forms where you can put the parameters in a query
string, but with inputs that are of file types, you can't do that ...
or can you?
- Dave
No, the POST is from the client end. The result of the POST is server end.
Client end is NOT php. Neither is the enctype nor the <input type=file tag.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attglobal.net
==================
From what he's saying I'd think he tries to make an auto-poster to do
posts in another website's form or a form located in another script,
and that si doable using PHP.- Hide quoted text -
- Show quoted text -

Hi, George interpreted my question correctly. George (and anyone
else), regarding your question
Do you really need it to be input=file? can't you just load the file, base64_encode it

I guess it doesn't have to be input=file. But when you say "load the
file", what do you mean? Thanks, - Dave
A link to the script your are trying to post in would be of much help,
but as I see, you should use either CURL or WGET to post it and use --
post-file in wget or the equivalent in CURL to do the thing.

Hope it helps.

George
Apr 1 '08 #9
On Apr 1, 2:54*pm, George Maicovschi <georgemaicovs...@gmail.com>
wrote:
On Apr 1, 10:15 pm, "laredotorn...@zipmail.com"

<laredotorn...@zipmail.comwrote:
On Apr 1, 6:49 am, George Maicovschi <georgemaicovs...@gmail.com>
wrote:
On Apr 1, 2:05 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
laredotorn...@zipmail.com wrote:
On Mar 31, 10:15 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
>laredotorn...@zipmail.com wrote:
>>Hi,
>>I'm using php 5. *Does anyone have any code or a function thatauto
>>submits a form that contains a single INPUT, of type = file?
>>Thanks, - Dave
>Nope. *Can't do it with PHP. *PHP is server side, and you need client side.
>--
>==================
>Remove the "x" from my email address
>Jerry Stuckle
>JDS Computer Training Corp.
>jstuck...@attglobal.net
>==================
Actually this would be a server side function that POSTs to a URL and
the enctype would be "multipart/form-data". *I've found tons of stuff
that auto-submit forms where you can put the parameters in a query
string, but with inputs that are of file types, you can't do that ....
or can you?
*- Dave
No, the POST is from the client end. *The result of the POST is server end.
Client end is NOT php. *Neither is the enctype nor the <input type=file tag.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attglobal.net
==================
From what he's saying I'd think he tries to make an auto-poster to do
posts in another website's form or a form located in another script,
and that si doable using PHP.- Hide quoted text -
- Show quoted text -
Hi, George interpreted my question correctly. *George (and anyone
else), regarding your question
Do you really need it to be input=file? can't you just load the file, base64_encode it
I guess it doesn't have to be input=file. *But when you say "load the
file", what do you mean? *Thanks, - Dave

A link to the script your are trying to post in would be of much help,
but as I see, you should use either CURL or WGET to post it and use --
post-file in wget or the equivalent in CURL to do the thing.

Hope it helps.

George- Hide quoted text -

- Show quoted text -
Thanks. As I write the script, I will post more. On the server end,
how do I retrieve the file? For example, in the wget command, I can't
see how you specify the file's parameter name. - Dave
Apr 1 '08 #10
la***********@zipmail.com wrote:
On Apr 1, 2:54 pm, George Maicovschi <georgemaicovs...@gmail.com>
wrote:
>On Apr 1, 10:15 pm, "laredotorn...@zipmail.com"

<laredotorn...@zipmail.comwrote:
>>On Apr 1, 6:49 am, George Maicovschi <georgemaicovs...@gmail.com>
wrote:
On Apr 1, 2:05 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
laredotorn...@zipmail.com wrote:
>On Mar 31, 10:15 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
>>laredotorn...@zipmail.com wrote:
>>>Hi,
>>>I'm using php 5. Does anyone have any code or a function that auto
>>>submits a form that contains a single INPUT, of type = file?
>>>Thanks, - Dave
>>Nope. Can't do it with PHP. PHP is server side, and you need client side.
>>--
>>==================
>>Remove the "x" from my email address
>>Jerry Stuckle
>>JDS Computer Training Corp.
>>jstuck...@attglobal.net
>>==================
>Actually this would be a server side function that POSTs to a URL and
>the enctype would be "multipart/form-data". I've found tons of stuff
>that auto-submit forms where you can put the parameters in a query
>string, but with inputs that are of file types, you can't do that ...
>or can you?
> - Dave
No, the POST is from the client end. The result of the POST is server end.
Client end is NOT php. Neither is the enctype nor the <input type=file tag.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attglobal.net
==================
From what he's saying I'd think he tries to make an auto-poster to do
posts in another website's form or a form located in another script,
and that si doable using PHP.- Hide quoted text -
- Show quoted text -
Hi, George interpreted my question correctly. George (and anyone
else), regarding your question
Do you really need it to be input=file? can't you just load the file, base64_encode it
I guess it doesn't have to be input=file. But when you say "load the
file", what do you mean? Thanks, - Dave
A link to the script your are trying to post in would be of much help,
but as I see, you should use either CURL or WGET to post it and use --
post-file in wget or the equivalent in CURL to do the thing.

Hope it helps.

George- Hide quoted text -

- Show quoted text -

Thanks. As I write the script, I will post more. On the server end,
how do I retrieve the file? For example, in the wget command, I can't
see how you specify the file's parameter name. - Dave
Don't even try to use wget. Rather, use http and submit the file from
your server to the other server.

Google on File upload cURL.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Apr 2 '08 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Simon Wigzell | last post by:
Is there a way to prevent a form submitting when you press enter on a text field? Some people press enter when they finish typing in a text field out of habit I guess unconcsciously thinking it...
1
by: Richard Dixson | last post by:
I have code that calls document.myFormName.submit() to submit a form automatically via JavaScript. This works just fine. However, if there is a button (or other form field element) on the form...
5
by: Tyler Style | last post by:
Hullo - looking for a little advice here. I have a form on a page in one domain submitting to a cgi in another domain. Weirdly, on some Windows XP systems, a form on the page fails to submit/post...
1
by: ogilby1 | last post by:
Using an immediate if to fill a field on a form based on the value of another field. During data entry on the form this methodology works well. When looking at the results in the datasheet view or...
2
by: Tom | last post by:
I am trying to store information into a table that has an auto increment field. There is currently no data in the table. Using the code below I cannot insert data into the table. I get an error...
0
by: Mike Kingscott | last post by:
Totally hacked off here. I've written a user control that contains a text box, a required field validator and a button (these being the cornerstone of a search facility), all as ASP.Net server...
5
by: Navillus | last post by:
Hey gang, I have a login form that is empty by default, but can be filled with values from a previous form: <input type=text maxlength="40" size="40" name="user" value="`usr`"> <input...
16
by: browntown | last post by:
so I have this application I'm nearly finished with. The only thing the client has requested is the ability to submit the form by pressing "enter". I didn't think this would be a huge pain in the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.