CodeIgniter Forums
cutted post array from the form - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: cutted post array from the form (/showthread.php?tid=2845)



cutted post array from the form - El Forum - 08-27-2007

[eluser]EugeneS[/eluser]
Hello,

any ideas what maight be wrong or on what it is depend ?

so in the form i add dynamically input elements with the name FormElement[] so this come to php script as an array, BUT on my local pc if I've added 10 form element i receive 10 elements in $_POST array but on the server this array limited to 6 elements ... do not understand on what this trouble depend ?

for example:
Code:
<form action="blabla" method="post">
  <input name="FormElement[]" value="1">
  <input name="FormElement[]" value="2">
  <input name="FormElement[]" value="3">
  <input name="FormElement[]" value="4">
  <input name="FormElement[]" value="5">
  <input name="FormElement[]" value="6">
  <input name="FormElement[]" value="7">
  <input name="FormElement[]" value="8">
  <input name="FormElement[]" value="9">
</form>

in php
Code:
var_export($_POST)

and i see only 6 values instead of 9.
I see from 4 to 9, so first 3 are absent :\ what the php setting or anything other ?

any ideas ?


cutted post array from the form - El Forum - 08-28-2007

[eluser]BravoAlpha[/eluser]
Works fine for me.

Code:
<?php

if (isset($_POST['submit']))
{
    var_export($_POST);
    exit;
}

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd">

&lt;html lang="en"&gt;
&lt;head&gt;
    &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&gt;
    &lt;title&gt;Test&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;

&lt;form action="test.php" method="post"&gt;
    &lt;input name="FormElement[]" value="a"&gt;<br>
    &lt;input name="FormElement[]" value="b"&gt;<br>
    &lt;input name="FormElement[]" value="c"&gt;<br>
    &lt;input name="FormElement[]" value="d"&gt;<br>
    &lt;input name="FormElement[]" value="e"&gt;<br>
    &lt;input name="FormElement[]" value="f"&gt;<br>
    &lt;input name="FormElement[]" value="g"&gt;<br>
    &lt;input name="FormElement[]" value="h"&gt;<br>
    &lt;input name="FormElement[]" value="i"&gt;<br>
    
    &lt;input type="submit" name="submit" value="Submit"&gt;
&lt;/form&gt;

&lt;/body&gt;
&lt;/html&gt;

Code:
array ( 'FormElement' => array ( 0 => 'a', 1 => 'b', 2 => 'c', 3 => 'd', 4 => 'e', 5 => 'f', 6 => 'g', 7 => 'h', 8 => 'i', ), 'submit' => 'Submit', )