http://blueimp.github.com/jQuery-File-Upload/
Sequence:
In this file uploader that i used, I want to pass a value using the $_GET['id'] request like this:
Problem:
$_GET['id']=2 could not be read inside the upload_class.php or index.php inside the folder of /server/php/. What is the best way to read the value of $_GET['id'] from the program?
can someone who is familiar with the program that can help me? thanks in advance ...
You can send data through the form which posts when you upload an image.
There are two ways to do this. Get or Post the data.
Alter the action
attribute of the form to include the additional parameter:
<form action="blueimp/php/index.php?id=2" method="post" enctype="multipart/form-data">
Access the variable in index.php with:
$id = $_GET['id'];
Add an input field to the form with the value that you would like to pass through:
<form action="blueimp/php/index.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="id" value="2" />
<div style="float:left;">
<label class="fileinput-button">
<span>Add Images</span>
<input id="fileSelector" type="file" name="files[]" multiple>
</label>
<button type="button" class="delete">Delete Selected</button>
<button type="button" class="checkAll">Check All</button>
</div>
</form>
Access the variable in index.php with:
$id = $_POST['id'];