<? function add_image() { { $temat = \"Przesylanie Plikow\"; html_header($temat, 800); ?> Sciezka:<input type=\"file\" name=\"userfile\" size=\"20\" maxlength=\"40\"> Nick: <input type=\"text\" name=\"nick\" size=\"20\" maxlength=\"20\"> Opis:<textarea rows=\"5\" cols=\"40\" name=\"description\"></textarea> <input type=\"submit\" value=\"Dodaj\"> </form> <? html_footer(); { $dir = \"/galeria\"; { error_message(\"Musisz podac nick!\"); exit; } { error_message(\"Musisz podac opis!\"); exit; } if($userfile_size <= 0) { error_message(\"Musisz podac sciezke do obrazka!\"); exit; } if($userfile_size > 2000000) { error_message(\"Plik jest za duzy. Maksymalna wielkosc to 2 Mb!\"); exit; } $img_path = \"$dir/$filename\"; $query = \"INSERT INTO gal_images VALUES(NULL, '$img_path', 'W', '$nick', '$_GET[id_cat]', '$description')\"; if(!$wynik) error_message(sql_error()); } } } ?>
Nie wiem co jest nie tak, moze cos w php.ini.
Thx
Pzdr