Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

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

Report this thread to moderator Post Follow-up to this message
Old Post
laredotornado@zipmail.com
04-01-08 01:16 AM


Re: Auto submitting a form that contains a file field
laredotornado@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.
jstucklex@attglobal.net
==================


Report this thread to moderator Post Follow-up to this message
Old Post
Jerry Stuckle
04-01-08 09:05 AM


Re: Auto submitting a form that contains a file field
On Mar 31, 10:15=A0pm, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> laredotorn...@zipmail.com wrote: 
> 
> 
>
> Nope. =A0Can't do it with PHP. =A0PHP is server side, and you need client =[/color
]
side.
>
> --
>  =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
3D=3D=3D=3D=3D
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstuck...@attglobal.net
>  =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
3D=3D=3D=3D=3D

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

Report this thread to moderator Post Follow-up to this message
Old Post
laredotornado@zipmail.com
04-01-08 09:05 AM


Re: Auto submitting a form that contains a file field
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.com> wrote:
> On Mar 31, 10:15 pm, Jerry Stuckle <jstuck...@attglobal.net> wrote:
>
>
> 
> 
> 
> 
> 
>
> 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

Report this thread to moderator Post Follow-up to this message
Old Post
George Maicovschi
04-01-08 09:05 AM


Re: Auto submitting a form that contains a file field
On Apr 1, 4:30 am, "laredotorn...@zipmail.com"
<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

hi deve,

please try this code..

<html>
<script language="javascript">
function f()
{
document.myform.submit();
}
</script>
<body>
<form name="myform" method="post" action="">
<input type="file" onchange="f()" />
</form>
</body>
</html>

Report this thread to moderator Post Follow-up to this message
Old Post
kumarasan
04-01-08 09:05 AM


Re: Auto submitting a form that contains a file field
kumarasan wrote:
> On Apr 1, 4:30 am, "laredotorn...@zipmail.com"
> <laredotorn...@zipmail.com> wrote: 
>
> hi deve,
>
> please try this code..
>
> <html>
> <script language="javascript">
> function f()
> {
> document.myform.submit();
> }
> </script>
> <body>
> <form name="myform" method="post" action="">
> <input type="file" onchange="f()" />
> </form>
> </body>
> </html>
>

Which

1) Has nothing to do with PHP (this is a PHP newsgroup, not a javascript
one)
2) Does not answer his question.

Which is why I tried to refer him to a more appropriate newsgroup - so
he will get a good answer.

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


Report this thread to moderator Post Follow-up to this message
Old Post
Jerry Stuckle
04-01-08 01:03 PM


Re: Auto submitting a form that contains a file field
laredotornado@zipmail.com wrote:
> On Mar 31, 10:15 pm, Jerry Stuckle <jstuck...@attglobal.net> wrote: 
>
> 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.
jstucklex@attglobal.net
==================


Report this thread to moderator Post Follow-up to this message
Old Post
Jerry Stuckle
04-01-08 01:03 PM


Re: Auto submitting a form that contains a file field
On Apr 1, 2:05 pm, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> laredotorn...@zipmail.com wrote: 
> 
> 
> 
>
> 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 ta
g.
>
> --
> ==================
> 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.

Report this thread to moderator Post Follow-up to this message
Old Post
George Maicovschi
04-01-08 01:03 PM


Re: Auto submitting a form that contains a file field
George Maicovschi wrote:
> On Apr 1, 2:05 pm, Jerry Stuckle <jstuck...@attglobal.net> wrote: 
>
> 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.
jstucklex@attglobal.net
==================


Report this thread to moderator Post Follow-up to this message
Old Post
Jerry Stuckle
04-01-08 01:03 PM


Re: Auto submitting a form that contains a file field
On Apr 1, 10:15 pm, "laredotorn...@zipmail.com"
<laredotorn...@zipmail.com> wrote:
> On Apr 1, 6:49 am, George Maicovschi <georgemaicovs...@gmail.com>
> wrote:
>
>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>
> Hi, George interpreted my question correctly.  George (and anyone
> else), regarding your question
> 
>
> 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

Report this thread to moderator Post Follow-up to this message
Old Post
George Maicovschi
04-02-08 12:07 AM


Sponsored Links




Last Thread Next Thread Next
Pages (2): [1] 2 »
Search this forum -> 
Post New Thread

PHP Programming archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 11:04 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.