how to get values from $_Post with onchange="form.submit();"?


Posted on 16th Feb 2014 07:03 pm by admin

Hi, I have a form that submit to itself with a file upload field and two other hidden field values.
If I put a submit button on the page, all is working fine.

I don't like the submit button as its wasting space. So I want to use
Did you know?Explore Trending and Topic pages for more stories like this.
Code: <input size="10" type="file" name="img1" onchange="image.submit();">
If I add Code: print_r($_FILES); I do get the array but the
Code: if(isset($_POST['submit'])){}does nothing...

My form is as follow.....
Code: <form method="POST" name="image" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" enctype="multipart/form-data" >
<table>
<input id="ad" name="ad" value="<?php echo $adnr;?>" type="hidden"/>
<input id="user" name="user" value="<?php echo $user;?>" type="hidden" />
<tr><td><input size="10" type="file" name="img1" onchange="image.submit();"></td></tr>
<tr><td><input type="submit" name="upload" value="Upload"></td></tr>
</table>

</form>
No comments posted yet

Your Answer:

Login to answer
130 Like 7 Dislike
Previous forums Next forums
Other forums

help with multi-update
Now sure how to ask this really....
10g database if that matters.

I have a customer

Pls help with PHP
Pls can anyone direct me on how to create a user account for a customer. For example i want know if

isset undefined variable
Hi all,

Hope someone can point out the obvious. I've a log in script, if you dont enter a use

natcasesort works on one server but not on another
Hi

I have a problem that I was hoping that someone can help me with.

I'm trying to use

Need help urgant
why down my code ony return one item instead of all the items selected.

$arr = array($date,$

Cron Job and Output
I have php codes running under a cron job.
But everytime i output (echo) , it comes out as comple

HOW to get the bind variables list.
I've the following problem : I've some SQL queries stored in my DB as VARCHAR2 values.
I need t

query help
Hi experts.

i have a table rep2 like this
PROD_COD ACCT_NO DUE_DAYS BALANCE

SQL query not working well
Hi,
I made a small table with 5 rows and want to make them an sql consult using rownum

quick question about System Change Number(SCN) in FlashBack Query topic
i know tht we can get the SCN of the database using flashback concept as follows

SQL>

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash