Hello everybody I’m trying to learn multiple upload but the problem is I can not pass the parameter and redeem it on the server side in PHP
I’m doing this:
<script language="JavaScript" type="text/javascript">
var vault = null;
function doOnLoad() {
vault = new dhtmlXVaultObject();
vault.setImagePath("../codebase/imgs/");
vault.setServerHandlers("UploadHandler.php", "GetInfoHandler.php", "GetIdHandler.php");
vault.isDemo = true;
vault.create("vault1");
vault.setFormField("customerId", "PS104");
vault.setFormField("country", "UK");
}
</script>
and in php i try get this:
$id = $_GET['sessionId'];
$id = trim($id);
$recebe = $_POST['country'];
session_name($id);
session_start();
$inputName = $_GET['userfile'];
$fileName = $_FILES[$inputName]['name'];
$tempLoc = $_FILES[$inputName]['tmp_name'];
echo $_FILES[$inputName]['error'];
$target_path = '../Arquivos/';
$target_path = $target_path. $recebe . basename($fileName);
if(move_uploaded_file($tempLoc,$target_path))
{
$_SESSION['value'] = -1;
}
I need to get what I’m sending the index: vault.setFormField(“country”, “UK”);
and get in php: $recebe = $_POST[‘country’];
help-me please!!