Camp File din enctype="multipart/form-data" nu e recunoscut in php
Scris: Dum Mar 06, 2016
Salut,
Am instructiuni in generarea unui formular cu element file (pentru upload) cam asa (simplificat):
In controler (prelucrari.php) la var_export($_POST) nu se regaseste variabila corespunzatoare cimpului type="file" (apare ca undefined si daca pun name explicit), care functioneaza daca il scriu in html. Unde gresesc? Multumesc.
Am instructiuni in generarea unui formular cu element file (pentru upload) cam asa (simplificat):
Cod: Selectaţi tot
<?php
$re .='<div id="'.$tabela.'" ><form action="prelucrari.php" id="'.$tabela.'" class="'.$tabela.'" method="POST" style="position: absolute; top:15%;right: 45%;text-align: right;" enctype="multipart/form-data" ><a href = "#" onclick = "ascundeFormular('."'".$clasa."'".","."'".$tabela."'".", "."'".$numeid."'".", "."'".$flag."'".');" style=" float:right;" ><img src="img/x.png" alt="" /></a><br/><br/>';
$re .= '<label for="'.$name.'" style="'.$display.'">'.$name.'</label><input type="file" name="'.$name.'" id="'.$name.'" align="right" style="width: 200px; height: 22px; margin: 3px; '.$display.'" /><br /><br /><br />';
$re .= "<input type='submit' value ='Save' onclick='verifica(); ascundeFormular(".'"'.$tabela.'"'.");' style ='cursor: pointer;' /> ";
$re .= '</form></div><br/>';
?>