if(isset($_GET[\"edit_profil\"])) { ?><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tbody><tr> <td colspan=\"4\" background=\"layout/spacer.gif\" height=\"3\" width=\"*\"></td> </tr><tr> <td background=\"layout/menu_l.gif\" height=\"25\" width=\"7\"></td> <td background=\"layout/menu_c.gif\" height=\"25\" nowrap=\"nowrap\" width=\"*\"> <font class=\"title2\"> <img src=\"layout/ALL.gif\" border=\"0\"> <b>Edycja profilu użytkownika</b> </td> </td> <td background=\"layout/menu_r.gif\" height=\"25\" width=\"6\"></td> </tr></tbody></table> <table border=\"0\" cellpadding=\"6\" cellspacing=\"0\" width=\"100%\"><tbody><tr> <td bgcolor=\"#f9f9f7\" height=\"12\" width=\"*\" ><? $cat_sql=\"SELECT * FROM category \"; echo\"<form method =\"post\" action=\"users.php\" >\"; for($i = 1; $i <= $ile_kategorii; $i++) { echo\"<input size=\"8\" type=\"checkbox\" name=\"kat$i\" value=\"\".$cat_row[\"cat_id\"].\":\">\".$cat_row[\"cat_name\"].\"<br>\"; } echo\"<input type=\"hidden\" name=\"ile\" value=\"$ile_kategorii\"><br>\"; ?><input size=\"8\" type=\"submit\" name=\"wybierz_kategorie\" value=\"Wybierz\"></form> <br><? echo\"kurwa\"; $klucz=$_COOKIE[\"user_key\"]; $klucz=$_SESSION[\"user_key\"]; } for($i = 1; $i <= $_POST[\"ile\"]; $i++) { $uzyt_sql=\"SELECT * FROM users WHERE user_key='$klucz'\"; $sql = \"insert into users_cat VALUES('\".$uzyt_row[\"user_id\"].\"', '\".$_POST[$kat[$i]].\"')\"; } }
Co musze zrobic aby zmienna $_POST[$kat[$i]] zawierała cat_id ? Obecnie jest pusta. Prosze o pomoc.