<form method=\"post\" action=\"\"> <? include ('config.php'); include('panel_gorny.inc'); if ($action==\"show_product\") { // wyswietlenie danych $id1=$kat_id; $result = mysql_db_query($dbname,\"SELECT * FROM produkty WHERE kategoria_id=$id1 ORDER BY produkt_id DESC\"); <td width=380>%s </td> <td width=50>%s </td> <td width=50>%s </td> <td width=50>%s </td> <td width=15><a href=\"aaa.php?action=edit_product&produkt_id=%s\\"><img src=\"../sysimg/edit.gif\" border=0 alt=\"Edytuj\"></a></td> <td width=15><a href=\\"aaa.php?action=usun_product&produkt_id=%s\"><img src=\"../sysimg/delete.gif\" border=0 alt=\"Usun\"></a></td>\", $row['index_produktu'], $row['nazwa'], $row['masa'], $row['cena'], $row['kategoria_id'], $row['produkt_id'], $row['produkt_id']); } } //koniec elseif($action==\"add_product\") { $sql = \"INSERT INTO produkty VALUES (null, '$index_produktu', '$nazwa', '$masa', '$cena', '$nazwa_zdjecia', '$kategoria_id')\"; endif; ?> <table width=\"700\" align=\"center\" border=1> <tr><td><center><h3>Dopisz wiadomosc do bazy danych</h3></center></td></tr> <tr bgcolor=\"dddddd\"><td><center>index produktu:</center></td></tr> <tr><td><center><input type=\"text\" size=\"90\" name=\"index_produktu\"></center></td></tr> <tr bgcolor=\"dddddd\"><td><center>nazwa:</center></td></tr> <tr><td><center><input type=\"text\" size=\"90\" name=\"nazwa\"></center></td></tr> <tr bgcolor=\"dddddd\"><td><center>masa:</center></td></tr> <tr><td><center><input type=\"text\" size=\"90\" name=\"masa\"></center></td></tr> <tr bgcolor=\"dddddd\"><td><center>cena:</center></td></tr> <tr><td><center><input type=\"text\" size=\"90\" name=\"cena\"></center></td></tr> <tr bgcolor=\"dddddd\"><td><center>nazwa zdjecia:</center></td></tr> <tr><td><center><input type=\"text\" size=\"90\" name=\"nazwa_zdjecia\"></center></td></tr> <tr><td><center><select name=\"kategoria_id\"> <? } ?> </select></center></td></tr></table> <center><input type=\"submit\" name=\"submit\" value=\"submit\"><input type=\"reset\" value=\"reset\"></center> <? } elseif ($action==\"wyslij_plik\") { $uplPath=\"\"; { } exit; endif; ?> <center> <form enctype=\"multipart/form-data\" action=\"aaa.php?action=wyslij_plik\" method=\"post\"> <input type=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"300000\"> plik: <input name=\"plik\" type=\"file\"> <input type=\"submit\" value=\"wyslij\"> </form> </center> <? }
Nie wiem czemu skrypt owy nie dziala jak napisze go w oddzielnych plikach wszystko jest ok a jak proboje go polaczyc to nie wysyla mi pliku. Czy ktos moze mi pomoc rozwiazac moj problem?
z gory dziekuje
ps. uzupelnilem skrypt bo skrypt jest dosc duzy i takich ifelsow jest wiecej