Code Comments
Programming Forum and web based access to our favorite programming groups.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
Post Follow-up to this messagelaredotornado@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 ==================
Post Follow-up to this messageOn 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
Post Follow-up to this messageHey 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
Post Follow-up to this messageOn 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>
Post Follow-up to this messagekumarasan 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
==================
Post Follow-up to this messagelaredotornado@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 ==================
Post Follow-up to this messageOn 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.
Post Follow-up to this messageGeorge 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 ==================
Post Follow-up to this messageOn 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
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.