Hallo,
ich baue eine Extension mit einer Bildupload Funktion.
Derzeit habe ich ein Formular und werte dieses erstmal aus in PHP.
Es kommen nur $_POST Variabeln an, wenn ich den Zusatz im Formular: enctype="multipart/form-data" weglasse.
Wenn ich den Enctype weglasse kommt der Filename als Postvaraible an.
es kommen keine Werte für $_FILES an, auch nicht wenn ich den enctype angebe.
Mein Formular:
<form method="post" enctype="multipart/form-data" action="###EPFORMACTION###" id="epedit" name="bfr_editprofile" >
<input type="hidden" name="MAX_FILE_SIZE" value="99999999" />
<div style="float:left;width:50%;">
<span style="color:#666666;">Geburtsdatum anzeigen</span><br />
<select style="width:200px;" name="tx_bfrvcard[showbirthdate]" id="showbirthdate" class="">
###BIRTHDAYOPTION###
</select>
</div>
<div style="float:left;width:50%;">
<span style="color:#666666;">Konzeneintritt anzeigen</span>
<select style="width:200px;" name="tx_bfrvcard[showfirstworkday]" id="showfirstworkday" class="">
###WORKDAYOPTION###
</select>
</div>
<div style="clear:both;font-size:0;height:10px;width:100%;"></div>
<span style="clear: both;color: #666666;display: block;">Profilfoto</span>
<input name="userfile" type="file" size="43" maxlength="100000" >
<p style="float:right;"><a href="#" onclick="">Foto löschen</a></p>
<div style="clear:both;font-size:0;height:10px;width:100%;"></div>
<div style="clear:both;font-size:0;height:0px;">
</div>
<div class="bfr_phbch_vcard_save">
<p style="margin-left:10px"><input type="submit" value="Speichern" /></p> </form>
In PHP lese ich die Posts und Files so aus:
$userfile = t3lib_div::_GP('userfile');
if (isset($_FILES['userfile'])...
Woran kann das liegen?
Hat jemand einen Tipp?
Gruß
Halion