In my php page,
I have a form
as:
'multipart/form-data' method="post">
Select File:
type="submit" name="upload" value="Upload" />
When I
submit the form on clicking the submit 'upload', the following php is called which is on
the same php
page:
if
(isset($_POST['upload'])) { ...Do stuff... }
?>
Now, I
dont want to use the submit in my html form and want to trigger this php whenever a file
in the input type file is selected. i.e. the form should be submitted automatically on
file selection without the submit button. Also, i want a if condition such as
isset($_POST['']) and dont want to use just a post check as $_SERVER['REQUEST_METHOD']
== 'POST'
Any help will be
appreciated.
No comments:
Post a Comment