1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
|
public function Upload_File1() {
if(move_uploaded_file($this->_tmp_name_file, $this->_final_path.'/'.$this->_new_name_file1)) {
$sql = "
UPDATE documents
SET file1 = :file1
WHERE id = :id
";
$stmt = $this->pdo->prepare($sql);
$stmt->bindValue(':file1', $this->_new_name_file1, PDO::PARAM_STR);
$stmt->bindValue(":id", $this->_idrecup, PDO::PARAM_INT ); //
$stmt->execute();
} else {
echo 'Echec pendant le transfert de votre fichier1 !';
}
}
public function Upload_File2() {
if(move_uploaded_file($this->_tmp_name_file, $this->_final_path.'/'.$this->_new_name_file2)) {
$sql = "
UPDATE documents
SET file2 = :file2
WHERE id = :id
";
$stmt = $this->pdo->prepare($sql);
$stmt->bindValue(':file2', $this->_new_name_file2, PDO::PARAM_STR);
$stmt->bindValue(":id", $this->_idrecup, PDO::PARAM_INT );
$stmt->execute();
} else {
echo 'Echec pendant le transfert de votre fichier2 !';
}
}
public function Upload_File3() {
if(move_uploaded_file($this->_tmp_name_file, $this->_final_path.'/'.$this->_new_name_file3)) {
$sql = "
UPDATE documents
SET file3 = :file3
WHERE id = :id
";
$stmt = $this->pdo->prepare($sql);
$stmt->bindValue(':file3', $this->_new_name_file3, PDO::PARAM_STR);
$stmt->bindValue(":id", $this->_idrecup, PDO::PARAM_INT );
$stmt->execute();
} else {
echo 'Echec pendant le transfert de votre fichier3 !';
}
} |
Partager