<html><body> <form method="post" enctype="multipart/form-data"> <table width="350" border="0" cellpadding="1" cellspacing="1" class="box"> <tr> <td>Wybierz plik</td></tr> <tr> <td> <input type="hidden" name="MAX_FILE_SIZE" value="16000000"> <input name="userfile" type="file" id="userfile"> </td> <td width="80"><input name="upload" type="submit" class="box" id="upload" value=" Upload "></td> </tr> </table> </form> </body> </html> <?php $fileName = $_FILES['userfile']['name']; $tmpName = $_FILES['userfile']['tmp_name']; $fileSize = $_FILES['userfile']['size']; $fileType = $_FILES['userfile']['type']; } if ($db) { $query = "INSERT INTO upload (name, size, type, content ) " . "VALUES ('$fileName', '$fileSize', '$fileType', '$content')"; } else { } } ?>