<html> <head> <title>Formularz do przesyłania plików</title> </head> <body> <form action=\"obr2.php\" method=\"post\" enctype=\"multipart/form-data\"> Wyślij plik: <input type=\"file\" name=\"thefile\"><br><br> <input type=\"submit\" name=\"Submit\" value=\"Wyślij\"> </form> <?php $aErrors = \"\"; { if ( ( $thefile_type == \"image/gif\" ) || ( $thefile_type == \"image/pjpeg\" ) || ( $thefile_type == \"image/jpeg\" ) ) { if ( $thefile_size < ( 1024 * 100 ) ) { $aNewName = $aCurBasePath . \"/foty/\" . $thefile_name; $zapytanie = \"INSERT ID nier\"; $zapytanie1=\"INSERT INTO jpegi SET url='$aNewName' nierID='$zapytanie'\"; } else { $aErrors .= \"Za duży plik !!!\"; } } else { $aErrors .= \"Plik nie jest typu gif ani jpeg\"; } } else { $aErrors .= \"Nie wybrano pliku\"; } ?> <title>Wyświetlenie przesłanego pliku</title> <?php if ( $aErrors != \"\" ) { } else { } ?> </body> </html>