In my website, user have to upload a file, and should have two buttons that redirects to either “action1.php” or “action2.php” based on the submit button user clicked.
<form action="action1.php" method="post" enctype="multipart/form-data" />
<b>Upload a file:<br/>
<input type="hidden" name="MAX_FILE_SIZE" value="31457"/>
<input type="file" name="userfile" id="userfile" size="30" />
<input type="submit" value="GET SEQUENCE" />
</form>
<form action="action2.php" method="post" enctype="multipart/form-data" />
<input type="hidden" name="MAX_FILE_SIZE" value="3145728"/>
<input type="file" name="userfile" id="userfile" size="30" />
<input type="submit" value="GET HELIX INFO" />
Here I have two browse buttons and two actions but the uploaded file is same in both cases. So I want only one browse button and based on what user clicks, it should give either “action1.php” result or “action2.php” result.
1 Answer