yeahz Posted November 23, 2010 Report Share Posted November 23, 2010 (edited) Kā pareizi vajadzētu pievienot šādu struktūru? <form> <textarea name="image[]" style="width:450px;"></textarea> </form> Kā pēc tam lai pievieno to visu kverijā un pareizi pārbauda datus? Edited November 23, 2010 by yeahz Quote Link to comment Share on other sites More sharing options...
briedis Posted November 23, 2010 Report Share Posted November 23, 2010 palaid print_r($_POST); un paskaties, kas tad tur atnāk. Quote Link to comment Share on other sites More sharing options...
yeahz Posted November 23, 2010 Author Report Share Posted November 23, 2010 nu jā, atnāk tie dati, bet ja man ir jāupdeito dati datubāzē, tur katram ierakstam ir jāzin kam to updeitot. Quote Link to comment Share on other sites More sharing options...
yeahz Posted November 23, 2010 Author Report Share Posted November 23, 2010 ok, ar to tiku galā, bet ka viņam te nepatīk? viss strādā, ieskaitot arī to, ka errors izlec :D $query = "UPDATE images SET comment=" . quote_smart($_POST['image'][$i]) . " WHERE id=" . quote_smart($_POST['img_id'][$i]) . " AND article_id=" . quote_smart($_GET['a_id']); Notice: Undefined offset: 14 in C:\web\kulaks\switch\add.php on line 134 Notice: Undefined offset: 14 in C:\web\kulaks\switch\add.php on line 134 Quote Link to comment Share on other sites More sharing options...
briedis Posted November 23, 2010 Report Share Posted November 23, 2010 Neesi slinks: http://www.google.lv/search?q=php%20Notice:%20Undefined%20offset Quote Link to comment Share on other sites More sharing options...
anonīms Posted November 26, 2010 Report Share Posted November 26, 2010 Rādi kodu. No savas puses veidotu tā if($_POST['image']) { foreach($_POST['image'] AS $post1=>$post2) { //tad attiecīgi post1 būs name['kas_ir_te'] un post2 kas_ir_te value } } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.