vvalter Posted August 26, 2011 Share Posted August 26, 2011 Hi I have generated pretty long table, 129 rows. This is how each row is generated: <?php foreach($products as $row): ?> <tr> <td><?php echo $row->artiklid_tootekood; ?></td> <td><?php echo wordwrap($row->laoseis_nimetus,40,"\n",TRUE); ?></td> <td><?php if($row->laoseis_seerianumber) { echo $row->laoseis_seerianumber; } ?></td> <td><?php echo $row->artiklid_tootegrupp; ?></td> <td><?php echo $this->ladu_model->returnLadu($row->laoseis_laduid); ?></td> <td><?php echo (round($row->laoseis_kogus)); ?></td> <td><?php echo $this->ladu_model->returnLadu($ladukuhu); ?></td> <td>row:<?php echo $cnt; ?> <input type="hidden" name="r[]" value="<?php echo ($cnt); ?>" /> <input type="hidden" name="lid[]" value="<?php echo $row->laoseis_id; ?>" /> <input type="hidden" name="lnim[]" value="<?php echo $row->laoseis_nimetus; ?>" /> <input type="hidden" name="lsn[]" value="<?php echo $row->laoseis_seerianumber; ?>" /> <input type="hidden" name="lart[]" value="<?php echo $row->laoseis_artid; ?>" /> <input type="hidden" name="ltoot[]" value="<?php echo $row->artiklid_tootegrupp; ?>" /> <input type="hidden" name="lkogus[]" value="<?php echo $row->laoseis_kogus; ?>" /> <input type="text" name="mitutk[]" maxlength="9" size=4 /> </td> </tr> <?php $cnt++; endforeach; ?> And this how every row looks in HTML source: [..] <tr> <td>NP-N145-JP01EE</td> <td>Samsung N145 Black Intel Atom N4551.66GHz 1GB 250GB 5400RPM 10.1</td> <td>987438756g</td> <td>Läpakad</td> <td>Rakvere</td> <td>1</td> <td>Väike-Maarja</td> <td>row:27 <input type="hidden" name="r[]" value="27" /> <input type="hidden" name="lid[]" value="132" /> <input type="hidden" name="lnim[]" value="Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1" /> <input type="hidden" name="lsn[]" value="987438756g" /> <input type="hidden" name="lart[]" value="2" /> <input type="hidden" name="ltoot[]" value="Läpakad" /> <input type="hidden" name="lkogus[]" value="1" /> <input type="text" name="mitutk[]" maxlength="9" size=4 /> </td> </tr> [..] And this is how it looks in browser: There is also a submit button, and this is where the problem begins ... THE PROBLEM When i click SUBMIT it should add ALL rows to POST, but it doesn't? WHY? Only this data is added to POST: i ran: php_info() : _POST["r"] Array ( [0] => 0 [1] => 1 [2] => 2 [3] => 3 [4] => 4 [5] => 5 [6] => 6 [7] => 7 [8] => 8 [9] => 9 [10] => 10 [11] => 11 [12] => 12 [13] => 13 [14] => 14 [15] => 15 [16] => 16 [17] => 17 [18] => 18 [19] => 19 [20] => 20 [21] => 21 [22] => 22 [23] => 23 [24] => 24 [25] => 25 [26] => 26 [27] => 27 [28] => 28 [29] => 29 [30] => 30 [31] => 31 [32] => 32 [33] => 33 [34] => 34 [35] => 35 [36] => 36 [37] => 37 [38] => 38 [39] => 39 [40] => 40 [41] => 41 [42] => 42 [43] => 43 [44] => 44 [45] => 45 [46] => 46 [47] => 47 [48] => 48 [49] => 49 [50] => 50 [51] => 51 [52] => 52 [53] => 53 [54] => 54 [55] => 55 [56] => 56 [57] => 57 [58] => 58 [59] => 59 [60] => 60 [61] => 61 [62] => 62 [63] => 63 [64] => 64 [65] => 65 [66] => 66 [67] => 67 [68] => 68 [69] => 69 [70] => 70 [71] => 71 [72] => 72 [73] => 73 [74] => 74 [75] => 75 [76] => 76 [77] => 77 [78] => 78 [79] => 79 [80] => 80 [81] => 81 [82] => 82 [83] => 83 [84] => 84 [85] => 85 [86] => 86 [87] => 87 [88] => 88 [89] => 89 [90] => 90 [91] => 91 [92] => 92 [93] => 93 [94] => 94 [95] => 95 [96] => 96 [97] => 97 [98] => 98 [99] => 99 [100] => 100 [101] => 101 [102] => 102 [103] => 103 [104] => 104 [105] => 105 [106] => 106 [107] => 107 [108] => 108 [109] => 109 [110] => 110 [111] => 111 [112] => 112 [113] => 113 [114] => 114 [115] => 115 [116] => 116 [117] => 117 [118] => 118 [119] => 119 [120] => 120 [121] => 121 [122] => 122 [123] => 123 [124] => 124 ) _POST["lid"] Array ( [0] => 459 [1] => 110 [2] => 140 [3] => 208 [4] => 303 [5] => 47 [6] => 108 [7] => 200 [8] => 109 [9] => 139 [10] => 134 [11] => 83 [12] => 204 [13] => 259 [14] => 138 [15] => 44 [16] => 239 [17] => 136 [18] => 50 [19] => 198 [20] => 76 [21] => 203 [22] => 133 [23] => 102 [24] => 207 [25] => 205 [26] => 162 [27] => 132 [28] => 211 [29] => 199 [30] => 206 [31] => 201 [32] => 46 [33] => 101 [34] => 210 [35] => 202 [36] => 382 [37] => 245 [38] => 342 [39] => 294 [40] => 296 [41] => 137 [42] => 293 [43] => 291 [44] => 285 [45] => 265 [46] => 298 [47] => 300 [48] => 281 [49] => 344 [50] => 290 [51] => 276 [52] => 299 [53] => 332 [54] => 263 [55] => 295 [56] => 209 [57] => 301 [58] => 262 [59] => 261 [60] => 282 [61] => 283 [62] => 264 [63] => 266 [64] => 267 [65] => 456 [66] => 465 [67] => 310 [68] => 53 [69] => 115 [70] => 119 [71] => 221 [72] => 401 [73] => 311 [74] => 112 [75] => 312 [76] => 117 [77] => 314 [78] => 120 [79] => 118 [80] => 270 [81] => 113 [82] => 313 [83] => 377 [84] => 420 [85] => 414 [86] => 365 [87] => 468 [88] => 469 [89] => 418 [90] => 463 [91] => 361 [92] => 466 [93] => 389 [94] => 419 [95] => 362 [96] => 417 [97] => 364 [98] => 366 [99] => 413 [100] => 363 [101] => 467 [102] => 415 [103] => 367 [104] => 368 [105] => 395 [106] => 357 [107] => 426 [108] => 348 [109] => 404 [110] => 406 [111] => 359 [112] => 428 [113] => 350 [114] => 429 [115] => 424 [116] => 421 [117] => 423 [118] => 347 [119] => 425 [120] => 422 [121] => 430 [122] => 358 [123] => 356 [124] => 427 ) _POST["lnim"] Array ( [0] => Paber [1] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [2] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [3] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [4] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [5] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [6] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [7] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [8] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [9] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [10] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [11] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [12] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [13] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [14] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [15] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [16] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [17] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [18] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [19] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [20] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [21] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [22] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [23] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [24] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [25] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [26] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [27] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [28] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [29] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [30] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [31] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [32] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [33] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [34] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [35] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [36] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [37] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [38] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [39] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [40] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [41] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [42] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [43] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [44] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [45] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [46] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [47] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [48] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [49] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [50] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [51] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [52] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [53] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [54] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [55] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [56] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [57] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [58] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [59] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [60] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [61] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [62] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [63] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [64] => Samsung N145 Black Intel Atom N455 1.66GHz 1GB 250GB 5400RPM 10.1 [65] => Tross [66] => Tross [67] => Sülearvuti Ordi Enduro XXX [68] => Sülearvuti Ordi Enduro XXX [69] => Sülearvuti Ordi Enduro XXX [70] => Sülearvuti Ordi Enduro XXX [71] => Sülearvuti Ordi Enduro XXX [72] => Sülearvuti Ordi Enduro XXX [73] => Sülearvuti Ordi Enduro XXX [74] => Sülearvuti Ordi Enduro XXX [75] => Sülearvuti Ordi Enduro XXX [76] => Sülearvuti Ordi Enduro XXX [77] => Sülearvuti Ordi Enduro XXX [78] => Sülearvuti Ordi Enduro XXX [79] => Sülearvuti Ordi Enduro XXX [80] => Sülearvuti Ordi Enduro XXX [81] => Sülearvuti Ordi Enduro XXX [82] => Sülearvuti Ordi Enduro XXX [83] => Printer Samsung ML-1660-2 [84] => HP Pavilion dm3-1131tx Notebook [85] => HP Pavilion dm3-1131tx Notebook [86] => HP Pavilion dm3-1131tx Notebook [87] => HP Pavilion dm3-1131tx Notebook [88] => HP Pavilion dm3-1131tx Notebook [89] => HP Pavilion dm3-1131tx Notebook [90] => HP Pavilion dm3-1131tx Notebook [91] => HP Pavilion dm3-1131tx Notebook [92] => HP Pavilion dm3-1131tx Notebook [93] => HP Pavilion dm3-1131tx Notebook [94] => HP Pavilion dm3-1131tx Notebook [95] => HP Pavilion dm3-1131tx Notebook [96] => HP Pavilion dm3-1131tx Notebook [97] => HP Pavilion dm3-1131tx Notebook [98] => HP Pavilion dm3-1131tx Notebook [99] => HP Pavilion dm3-1131tx Notebook [100] => HP Pavilion dm3-1131tx Notebook [101] => HP Pavilion dm3-1131tx Notebook [102] => HP Pavilion dm3-1131tx Notebook [103] => HP Pavilion dm3-1131tx Notebook [104] => HP Pavilion dm3-1131tx Notebook [105] => ASUS G74SX [106] => ASUS G74SX [107] => ASUS G74SX [108] => ASUS G74SX [109] => ASUS G74SX [110] => ASUS G74SX [111] => ASUS G74SX [112] => ASUS G74SX [113] => ASUS G74SX [114] => ASUS G74SX [115] => ASUS G74SX [116] => ASUS G74SX [117] => ASUS G74SX [118] => ASUS G74SX [119] => ASUS G74SX [120] => ASUS G74SX [121] => ASUS G74SX [122] => ASUS G74SX [123] => ASUS G74SX [124] => ASUS G74SX ) _POST["lsn"] Array ( [0] => 0 [1] => 8998 [2] => 65r765 [3] => õüöõüpl [4] => zsdsa< [5] => o7yfr56 [6] => 6666 [7] => 7654 [8] => 7777 [9] => dy457 [10] => 46885 [11] => i6tdfty [12] => iytfd [13] => 765ffd [14] => 665df [15] => u6fu [16] => t6iytrt [17] => 0954id [18] => o7ytt [19] => 675 [20] => 9y78h [21] => htgfdc5t [22] => 44567f [23] => 7778 [24] => öpkäk [25] => 976x57 [26] => 31337 [27] => 987438756g [28] => gfyytfytftyf [29] => 65f [30] => vchgd [31] => 65er65e [32] => u6fu5yf [33] => 6667 [34] => iuhiouh [35] => 54sd54 [36] => zgsgf [37] => iuiuh [38] => ygtgygttt [39] => fgdgfss [40] => püopüo [41] => 9430fe [42] => trololol [43] => yyyty [44] => ff56f [45] => 62ir [46] => uyt87 [47] => jhvjhg [48] => 4443s [49] => 54rf [50] => 555rtruz [51] => 6rtytyy [52] => ,jn,jn [53] => uuu87y [54] => 8654ytde [55] => iuyiuy [56] => kiopjkoi [57] => hgfchf [58] => dy54 [59] => u463y [60] => 3www3 [61] => 66e54 [62] => 5634rtws [63] => tred543 [64] => e643 [65] => superspecial234 [66] => 0 [67] => 64sey54eyrt [68] => i76tryr [69] => itttr [70] => iytrtiy [71] => yerwy [72] => yrf65rytr5 [73] => sd5474ytr [74] => rf86ot [75] => uy5r464 [76] => re5r5 [77] => 865rf654 [78] => sytre [79] => e65r7865 [80] => 854rt556 [81] => khgfghf [82] => ur5e [83] => äiö [84] => h878778 [85] => h89068976 [86] => 1131-305H [87] => 77777 [88] => 88888 [89] => h09099 [90] => h76437 [91] => 1131-301H [92] => 76t76t [93] => 87y68 [94] => h989898 [95] => 1131-302H [96] => h098098 [97] => 1131-304H [98] => 1131-306H [99] => h11028 [100] => 1131-303H [101] => 4444e [102] => h674 [103] => 1131-307H [104] => 1131-308H [105] => uyt67 [106] => Ag74sx000011 [107] => a6665 [108] => Ag74sx000002 [109] => Ag74sx000007 [110] => Ag74sx000008 [111] => Ag74sx000013 [112] => a44544 [113] => Ag74sx000004 [114] => a87569 [115] => a90777 [116] => a187126 [117] => a875+0 [118] => Ag74sx000001 [119] => a77766 [120] => a8754 [121] => a564376 [122] => Ag74sx000012 [123] => Ag74sx000010 [124] => a5554 ) _POST["lart"] Array ( [0] => 1 [1] => 2 [2] => 2 [3] => 2 [4] => 2 [5] => 2 [6] => 2 [7] => 2 [8] => 2 [9] => 2 [10] => 2 [11] => 2 [12] => 2 [13] => 2 [14] => 2 [15] => 2 [16] => 2 [17] => 2 [18] => 2 [19] => 2 [20] => 2 [21] => 2 [22] => 2 [23] => 2 [24] => 2 [25] => 2 [26] => 2 [27] => 2 [28] => 2 [29] => 2 [30] => 2 [31] => 2 [32] => 2 [33] => 2 [34] => 2 [35] => 2 [36] => 2 [37] => 2 [38] => 2 [39] => 2 [40] => 2 [41] => 2 [42] => 2 [43] => 2 [44] => 2 [45] => 2 [46] => 2 [47] => 2 [48] => 2 [49] => 2 [50] => 2 [51] => 2 [52] => 2 [53] => 2 [54] => 2 [55] => 2 [56] => 2 [57] => 2 [58] => 2 [59] => 2 [60] => 2 [61] => 2 [62] => 2 [63] => 2 [64] => 2 [65] => 8 [66] => 8 [67] => 9 [68] => 9 [69] => 9 [70] => 9 [71] => 9 [72] => 9 [73] => 9 [74] => 9 [75] => 9 [76] => 9 [77] => 9 [78] => 9 [79] => 9 [80] => 9 [81] => 9 [82] => 9 [83] => 12 [84] => 13 [85] => 13 [86] => 13 [87] => 13 [88] => 13 [89] => 13 [90] => 13 [91] => 13 [92] => 13 [93] => 13 [94] => 13 [95] => 13 [96] => 13 [97] => 13 [98] => 13 [99] => 13 [100] => 13 [101] => 13 [102] => 13 [103] => 13 [104] => 13 [105] => 14 [106] => 14 [107] => 14 [108] => 14 [109] => 14 [110] => 14 [111] => 14 [112] => 14 [113] => 14 [114] => 14 [115] => 14 [116] => 14 [117] => 14 [118] => 14 [119] => 14 [120] => 14 [121] => 14 [122] => 14 [123] => 14 ) _POST["ltoot"] Array ( [0] => Söömine [1] => Läpakad [2] => Läpakad [3] => Läpakad [4] => Läpakad [5] => Läpakad [6] => Läpakad [7] => Läpakad [8] => Läpakad [9] => Läpakad [10] => Läpakad [11] => Läpakad [12] => Läpakad [13] => Läpakad [14] => Läpakad [15] => Läpakad [16] => Läpakad [17] => Läpakad [18] => Läpakad [19] => Läpakad [20] => Läpakad [21] => Läpakad [22] => Läpakad [23] => Läpakad [24] => Läpakad [25] => Läpakad [26] => Läpakad [27] => Läpakad [28] => Läpakad [29] => Läpakad [30] => Läpakad [31] => Läpakad [32] => Läpakad [33] => Läpakad [34] => Läpakad [35] => Läpakad [36] => Läpakad [37] => Läpakad [38] => Läpakad [39] => Läpakad [40] => Läpakad [41] => Läpakad [42] => Läpakad [43] => Läpakad [44] => Läpakad [45] => Läpakad [46] => Läpakad [47] => Läpakad [48] => Läpakad [49] => Läpakad [50] => Läpakad [51] => Läpakad [52] => Läpakad [53] => Läpakad [54] => Läpakad [55] => Läpakad [56] => Läpakad [57] => Läpakad [58] => Läpakad [59] => Läpakad [60] => Läpakad [61] => Läpakad [62] => Läpakad [63] => Läpakad [64] => Läpakad [65] => Test: 12 [66] => Test: 12 [67] => Läpakad [68] => Läpakad [69] => Läpakad [70] => Läpakad [71] => Läpakad [72] => Läpakad [73] => Läpakad [74] => Läpakad [75] => Läpakad [76] => Läpakad [77] => Läpakad [78] => Läpakad [79] => Läpakad [80] => Läpakad [81] => Läpakad [82] => Läpakad [83] => Tere [84] => Läpakad [85] => Läpakad [86] => Läpakad [87] => Läpakad [88] => Läpakad [89] => Läpakad [90] => Läpakad [91] => Läpakad [92] => Läpakad [93] => Läpakad [94] => Läpakad [95] => Läpakad [96] => Läpakad [97] => Läpakad [98] => Läpakad [99] => Läpakad [100] => Läpakad [101] => Läpakad [102] => Läpakad [103] => Läpakad [104] => Läpakad [105] => Läpakad [106] => Läpakad [107] => Läpakad [108] => Läpakad [109] => Läpakad [110] => Läpakad [111] => Läpakad [112] => Läpakad [113] => Läpakad [114] => Läpakad [115] => Läpakad [116] => Läpakad [117] => Läpakad [118] => Läpakad [119] => Läpakad [120] => Läpakad [121] => Läpakad [122] => Läpakad [123] => Läpakad ) _POST["lkogus"] Array ( [0] => 7333 [1] => 1 [2] => 1 [3] => 1 [4] => 1 [5] => 1 [6] => 1 [7] => 1 [8] => 1 [9] => 1 [10] => 1 [11] => 1 [12] => 1 [13] => 1 [14] => 1 [15] => 1 [16] => 1 [17] => 1 [18] => 1 [19] => 1 [20] => 1 [21] => 1 [22] => 1 [23] => 1 [24] => 1 [25] => 1 [26] => 1 [27] => 1 [28] => 1 [29] => 1 [30] => 1 [31] => 1 [32] => 1 [33] => 1 [34] => 1 [35] => 1 [36] => 1 [37] => 1 [38] => 1 [39] => 1 [40] => 1 [41] => 1 [42] => 1 [43] => 1 [44] => 1 [45] => 1 [46] => 1 [47] => 1 [48] => 1 [49] => 1 [50] => 1 [51] => 1 [52] => 1 [53] => 1 [54] => 1 [55] => 1 [56] => 1 [57] => 1 [58] => 1 [59] => 1 [60] => 1 [61] => 1 [62] => 1 [63] => 1 [64] => 1 [65] => 1 [66] => 5000 [67] => 1 [68] => 1 [69] => 1 [70] => 1 [71] => 1 [72] => 1 [73] => 1 [74] => 1 [75] => 1 [76] => 1 [77] => 1 [78] => 1 [79] => 1 [80] => 1 [81] => 1 [82] => 1 [83] => 1 [84] => 1 [85] => 1 [86] => 1 [87] => 1 [88] => 1 [89] => 1 [90] => 1 [91] => 1 [92] => 1 [93] => 1 [94] => 1 [95] => 1 [96] => 1 [97] => 1 [98] => 1 [99] => 1 [100] => 1 [101] => 1 [102] => 1 [103] => 1 [104] => 1 [105] => 1 [106] => 1 [107] => 1 [108] => 1 [109] => 1 [110] => 1 [111] => 1 [112] => 1 [113] => 1 [114] => 1 [115] => 1 [116] => 1 [117] => 1 [118] => 1 [119] => 1 [120] => 1 [121] => 1 [122] => 1 [123] => 1 ) _POST["mitutk"] Array ( [0] => [1] => [2] => [3] => [4] => [5] => [6] => [7] => [8] => [9] => [10] => [11] => [12] => [13] => [14] => [15] => [16] => [17] => [18] => [19] => [20] => [21] => [22] => [23] => [24] => [25] => [26] => [27] => [28] => [29] => [30] => [31] => [32] => [33] => [34] => [35] => [36] => [37] => [38] => [39] => [40] => [41] => [42] => [43] => [44] => [45] => [46] => [47] => [48] => [49] => [50] => [51] => [52] => [53] => [54] => [55] => [56] => [57] => [58] => [59] => [60] => [61] => [62] => [63] => [64] => [65] => [66] => [67] => [68] => [69] => [70] => [71] => [72] => [73] => [74] => [75] => [76] => [77] => [78] => [79] => [80] => [81] => [82] => [83] => [84] => [85] => [86] => [87] => [88] => [89] => [90] => [91] => [92] => [93] => [94] => [95] => [96] => [97] => [98] => [99] => [100] => [101] => [102] => [103] => [104] => [105] => [106] => [107] => [108] => [109] => [110] => [111] => [112] => [113] => [114] => [115] => [116] => [117] => [118] => [119] => [120] => [121] => [122] => [123] => ) As you see, each array ends in 123 or 124, but I have 129 rows. Each array must hold 129 values not 123 or 124.. Why it doesn't add all row's to POST? This is how i generated another table to see POST data $data['test_table'] = '<table class="table"><tr><td>r</td><td>laoseis_id</td><td>laoseis_nimetus</td><td>laoseis_seerianumber</td><td>laoseis_artid</td><td>laoseis_tootegrupp</td><td>laoseis_kogus</td><td>mitu tykki</td></tr>'; foreach($_POST['r'] as $key=>$row) { $data['test_table'].=" <tr> <td>".$_POST['r'][$key]." </td> <td>".$_POST['lid'][$key]."</td> <td>".$_POST['lnim'][$key]."</td> <td>".$_POST['lsn'][$key]."</td> <td>".$_POST['lart'][$key]."</td> <td>".$_POST['ltoot'][$key]."</td> <td>".$_POST['lkogus'][$key]."</td> <td>".$_POST['mitutk'][$key]."</td> </tr>"; } $data['test_table'].="<table>"; and this is how it looks like in browser See ? It stops randomly at 124 row.. There should be 129 rows .. Also my post size cant be limited or something, because php_info() showed me: post_max_size: 8M Please help. Valter. Quote Link to comment https://forums.phpfreaks.com/topic/245752-post-does-not-work-properly-why-it-doesnt-add-all-rows-to-post/ Share on other sites More sharing options...
ZulfadlyAshBurn Posted August 26, 2011 Share Posted August 26, 2011 i dont think you should use [] as part of the input names. Quote Link to comment https://forums.phpfreaks.com/topic/245752-post-does-not-work-properly-why-it-doesnt-add-all-rows-to-post/#findComment-1262207 Share on other sites More sharing options...
WebStyles Posted August 26, 2011 Share Posted August 26, 2011 i dont think you should use [] as part of the input names. why not? he's using that so that he can have the same name and the values will be stored in arrays. It's perfectly good. Quote Link to comment https://forums.phpfreaks.com/topic/245752-post-does-not-work-properly-why-it-doesnt-add-all-rows-to-post/#findComment-1262208 Share on other sites More sharing options...
vvalter Posted August 26, 2011 Author Share Posted August 26, 2011 This is how it should work: http://www.suvaline.org/_/php_post_test.php There is a SUBMIT button end of the page, click it. And then it shows phpinfo(). Scroll down a bit and you see, all 500 rows (0-499) perfectly added to POST. <title> PHP post test </title> <?php if ($_GET['post']) { phpinfo(); } else { ?> <form method="post" action="http://www.suvaline.org/_/php_post_test.php?post=1"> <table border=1 width=800px> <?php $cnt=0; for ($i = 1; $i <= 500; $i++) { ?> <tr> <td>78687676 </td> <td>Product name <?php echo $cnt ?></td> <td>Product serial <?php echo $cnt ?></td> <td>Product group <?php echo $cnt ?></td> <td>From <?php echo $cnt ?></td> <td>Amount <?php echo $cnt ?></td> <td>To <?php echo $cnt ?></td> <td>row:<?php echo $cnt; /*DEBUG*/ ?> <input type="hidden" name="r[]" value="Product name <?php echo $cnt; ?>" /> <input type="hidden" name="lid[]" value="<?php echo $cnt; ?>" /> <input type="hidden" name="lnim[]" value="Product name <?php echo $cnt; ?>" /> <input type="hidden" name="lsn[]" value="Product serial <?php echo $cnt; ?>" /> <input type="hidden" name="lart[]" value="<?php echo $cnt; ?>" /> <input type="hidden" name="ltoot[]" value="Product group<?php echo $cnt; ?>" /> <input type="hidden" name="lkogus[]" value="<?php echo $cnt; ?>" /> <input type="text" name="mitutk[]" maxlength="9" size=4 /> </td> </tr> <?php $cnt++; } ?> </table> <button type="submit">CLICK!</button> </form> <?php } ?> Quote Link to comment https://forums.phpfreaks.com/topic/245752-post-does-not-work-properly-why-it-doesnt-add-all-rows-to-post/#findComment-1262209 Share on other sites More sharing options...
WebStyles Posted August 26, 2011 Share Posted August 26, 2011 so it's working ? or do you still have bugs? Quote Link to comment https://forums.phpfreaks.com/topic/245752-post-does-not-work-properly-why-it-doesnt-add-all-rows-to-post/#findComment-1262211 Share on other sites More sharing options...
vvalter Posted August 26, 2011 Author Share Posted August 26, 2011 No , it's not working.. I still have the same bugs like I mentioned in first POST.. My last post I just showed, how it SHOULD work, but in some unknown reason, it doesn't work for me in other server and other form/case/situation(?*)... (*Sorry, English is not my native language and i just don't find the right word .. ) Quote Link to comment https://forums.phpfreaks.com/topic/245752-post-does-not-work-properly-why-it-doesnt-add-all-rows-to-post/#findComment-1262216 Share on other sites More sharing options...
PFMaBiSmAd Posted August 26, 2011 Share Posted August 26, 2011 Is the data the same on the two different servers? I suspect that you have a character in a value that is breaking the HTML. You should use htmlentities with the second parameter set to ENT_QUOTES on all data values that you output into a form. What exactly is the 'view source' starting from row 122 to the end of the form. Another possibility is you have the Suhosin hardened php patch installed and it is limiting the total number of form fields. If you exceed the post_max_size, the $_POST array will be empty, not cut off. Quote Link to comment https://forums.phpfreaks.com/topic/245752-post-does-not-work-properly-why-it-doesnt-add-all-rows-to-post/#findComment-1262221 Share on other sites More sharing options...
vvalter Posted August 26, 2011 Author Share Posted August 26, 2011 Is the data the same on the two different servers? I suspect that you have a character in a value that is breaking the HTML. You should use htmlentities with the second parameter set to ENT_QUOTES on all data values that you output into a form. What exactly is the 'view source' starting from row 122 to the end of the form. Another possibility is you have the Suhosin hardened php patch installed and it is limiting the total number of form fields. If you exceed the post_max_size, the $_POST array will be empty, not cut off. Data is different between two different servers. I tried htmlentities before but it didn't change anything. "What exactly is the 'view source' starting from row 122 to the end of the form." <tr> <td>24201115156</td> <td>ASUS G74SX</td> <td>Ag74sx000012</td> <td>Läpakad</td> <td>Rakvere</td> <td>1</td> <td>Väike-Maarja</td> <td>row:122 <input type="hidden" name="r[]" value="122" /> <input type="hidden" name="lid[]" value="358" /> <input type="hidden" name="lnim[]" value="ASUS G74SX" /> <input type="hidden" name="lsn[]" value="Ag74sx000012" /> <input type="hidden" name="lart[]" value="14" /> <input type="hidden" name="ltoot[]" value="Läpakad" /> <input type="hidden" name="lkogus[]" value="1" /> <input type="text" name="mitutk[]" maxlength="9" size=4 /> </td> </tr> <tr> <td>24201115156</td> <td>ASUS G74SX</td> <td>Ag74sx000010</td> <td>Läpakad</td> <td>Rakvere</td> <td>1</td> <td>Väike-Maarja</td> <td>row:123 <input type="hidden" name="r[]" value="123" /> <input type="hidden" name="lid[]" value="356" /> <input type="hidden" name="lnim[]" value="ASUS G74SX" /> <input type="hidden" name="lsn[]" value="Ag74sx000010" /> <input type="hidden" name="lart[]" value="14" /> <input type="hidden" name="ltoot[]" value="Läpakad" /> <input type="hidden" name="lkogus[]" value="1" /> <input type="text" name="mitutk[]" maxlength="9" size=4 /> </td> </tr> <tr> <td>24201115156</td> <td>ASUS G74SX</td> <td>a5554</td> <td>Läpakad</td> <td>Rakvere</td> <td>1</td> <td>Väike-Maarja</td> <td>row:124 <input type="hidden" name="r[]" value="124" /> <input type="hidden" name="lid[]" value="427" /> <input type="hidden" name="lnim[]" value="ASUS G74SX" /> <input type="hidden" name="lsn[]" value="a5554" /> <input type="hidden" name="lart[]" value="14" /> <input type="hidden" name="ltoot[]" value="Läpakad" /> <input type="hidden" name="lkogus[]" value="1" /> <input type="text" name="mitutk[]" maxlength="9" size=4 /> </td> </tr> <tr> <td>24201115156</td> <td>ASUS G74SX</td> <td>Ag74sx000003</td> <td>Läpakad</td> <td>Rakvere</td> <td>1</td> <td>Väike-Maarja</td> <td>row:125 <input type="hidden" name="r[]" value="125" /> <input type="hidden" name="lid[]" value="349" /> <input type="hidden" name="lnim[]" value="ASUS G74SX" /> <input type="hidden" name="lsn[]" value="Ag74sx000003" /> <input type="hidden" name="lart[]" value="14" /> <input type="hidden" name="ltoot[]" value="Läpakad" /> <input type="hidden" name="lkogus[]" value="1" /> <input type="text" name="mitutk[]" maxlength="9" size=4 /> </td> </tr> <tr> <td>24201115156</td> <td>ASUS G74SX</td> <td>Ag74sx000014</td> <td>Läpakad</td> <td>Rakvere</td> <td>1</td> <td>Väike-Maarja</td> <td>row:126 <input type="hidden" name="r[]" value="126" /> <input type="hidden" name="lid[]" value="360" /> <input type="hidden" name="lnim[]" value="ASUS G74SX" /> <input type="hidden" name="lsn[]" value="Ag74sx000014" /> <input type="hidden" name="lart[]" value="14" /> <input type="hidden" name="ltoot[]" value="Läpakad" /> <input type="hidden" name="lkogus[]" value="1" /> <input type="text" name="mitutk[]" maxlength="9" size=4 /> </td> </tr> <tr> <td>24201115156</td> <td>ASUS G74SX</td> <td>Ag74sx000009</td> <td>Läpakad</td> <td>Rakvere</td> <td>1</td> <td>Väike-Maarja</td> <td>row:127 <input type="hidden" name="r[]" value="127" /> <input type="hidden" name="lid[]" value="355" /> <input type="hidden" name="lnim[]" value="ASUS G74SX" /> <input type="hidden" name="lsn[]" value="Ag74sx000009" /> <input type="hidden" name="lart[]" value="14" /> <input type="hidden" name="ltoot[]" value="Läpakad" /> <input type="hidden" name="lkogus[]" value="1" /> <input type="text" name="mitutk[]" maxlength="9" size=4 /> </td> </tr> <tr> <td>24201115156</td> <td>ASUS G74SX</td> <td>Ag74sx000005</td> <td>Läpakad</td> <td>Rakvere</td> <td>1</td> <td>Väike-Maarja</td> <td>row:128 <input type="hidden" name="r[]" value="128" /> <input type="hidden" name="lid[]" value="351" /> <input type="hidden" name="lnim[]" value="ASUS G74SX" /> <input type="hidden" name="lsn[]" value="Ag74sx000005" /> <input type="hidden" name="lart[]" value="14" /> <input type="hidden" name="ltoot[]" value="Läpakad" /> <input type="hidden" name="lkogus[]" value="1" /> <input type="text" name="mitutk[]" maxlength="9" size=4 /> </td> </tr> <tr> <td>24201115156</td> <td>ASUS G74SX</td> <td>Ag74sx000006</td> <td>Läpakad</td> <td>Rakvere</td> <td>1</td> <td>Väike-Maarja</td> <td>row:129 <input type="hidden" name="r[]" value="129" /> <input type="hidden" name="lid[]" value="352" /> <input type="hidden" name="lnim[]" value="ASUS G74SX" /> <input type="hidden" name="lsn[]" value="Ag74sx000006" /> <input type="hidden" name="lart[]" value="14" /> <input type="hidden" name="ltoot[]" value="Läpakad" /> <input type="hidden" name="lkogus[]" value="1" /> <input type="text" name="mitutk[]" maxlength="9" size=4 /> </td> </tr> <input type="readonly" name="totalrows" value="129" /> </tbody> <tfoot> <tr> <td colspan="8"> <button type="submit" name="tee_laoliikumine" tabindex="4">Salvesta</button> </td> </tr> </tfoot> </table> </div> </div> </form> -- I think i got closer to solution but still far away: Is it possible that POST can hold close to 988 - 989 keys ? Because if i have 8 hidden inputs in 1 row (8 array keys per row) And POST data showed me 123 rows and 1 broken row (4 columns only), So i calculated: 8 x 123 + 4 = 988 array keys No i removed 1 hidden input for test, so i have 7 hidden inputs (7 array keys per row) And POST data showed me 141 rows and 1 broken row (2 columns only), So i calculated 7 x 141 + 2 = 989 array keys I don't know does these numbers show anything or not, but seems like there's a limited array keys for POST?? Quote Link to comment https://forums.phpfreaks.com/topic/245752-post-does-not-work-properly-why-it-doesnt-add-all-rows-to-post/#findComment-1262223 Share on other sites More sharing options...
vvalter Posted August 29, 2011 Author Share Posted August 29, 2011 As i realized that there's some unknown limit for array keys, then i did the dumb-way but atleast it works: if this didnt work: (too much array keys) <input type="hidden" name="aaa[]" value="<?php echo $row->aaa; ?>" /> <input type="hidden" name="bbb[]" value="<?php echo $row->bbb; ?>" /> <input type="hidden" name="ccc[]" value="<?php echo $row->ccc; ?>" /> <input type="hidden" name="ddd[]" value="<?php echo $row->ddd; ?>" /> ... etc then this works: <?php $pp= 'aaa[] = '.$row->aaa.' ; bbb[] = '.$row->bbb.' ; ccc[] = '.$row->ccc.' ; ddd[] = '.$row->ddd.' ; '; ?> <input type="hidden" name="rpost[]" value="<?php echo $pp ?>" /> and after i clicked SUBMIT, then i just used eval() to get this variables eval($_POST['rpost'][$key]); Well, I can tell it's SOLVED someway but still it's not the right ... There's STILL some limit. Like if I have 1000 rows or something then i still cant add all rows to POST .. But seems like i have to do pagination or something but on that table there would be better without pagination .. And I have to point that i use codeigniter and this may have some limits? Quote Link to comment https://forums.phpfreaks.com/topic/245752-post-does-not-work-properly-why-it-doesnt-add-all-rows-to-post/#findComment-1263050 Share on other sites More sharing options...
vvalter Posted August 29, 2011 Author Share Posted August 29, 2011 I got better solution because eval is evil. if this didnt work: (too much array keys) <input type="hidden" name="aaa[]" value="<?php echo $row->aaa; ?>" /> <input type="hidden" name="bbb[]" value="<?php echo $row->bbb; ?>" /> <input type="hidden" name="ccc[]" value="<?php echo $row->ccc; ?>" /> <input type="hidden" name="ddd[]" value="<?php echo $row->ddd; ?>" /> then this works: $pp = $row->aaa."|". $row->bbb."|". $row->ccc; <input type="hidden" name="rpost[]" value="<?php echo $pp ?>" /> and after i clicked SUBMIT, then i just used explode() to get this variables explode("|", $_POST['rpost'][$key]); Quote Link to comment https://forums.phpfreaks.com/topic/245752-post-does-not-work-properly-why-it-doesnt-add-all-rows-to-post/#findComment-1263076 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.