View Single Post
Old 12-26-2010, 02:46 PM   #2 (permalink)
maeltar
The Acquainted
 
Join Date: Nov 2009
Location: nr Stratford-Upon-Avon
Posts: 137
Thanks: 3
maeltar is on a distinguished road
Default

Ok, so I now know how to get the form data into arrays...

Code:
<body>
<form id="form1" name="form1" method="post" action="<? $_SERVER['PHP_SELF']; ?>">
  <label>col1
  <input type="text" name="col1[]" id="col1" />
  </label>
  <label>col2
  <input type="text" name="col2[]" id="col2" />
  </label>
  <label>col3
  <input type="text" name="col3[]" id="col3" />
  </label>
  <p>
    <label>col1
    <input type="text" name="col1[]" id="col4" />
    </label>
    <label>col2
    <input type="text" name="col2[]" id="col5" />
    </label>
    <label>col3
    <input type="text" name="col3[]" id="col6" />
    </label>
</p>
  <p>
    <label>col1
    <input type="text" name="col1[]" id="col7" />
    </label>
    <label>col2
    <input type="text" name="col2[]" id="col8" />
    </label>
    <label>col3
    <input type="text" name="col3[]" id="col9" />
    </label>
</p>
  <p>
    <label>col1
    <input type="text" name="col1[]" id="col10" />
    </label>
    <label>col2
    <input type="text" name="col2[]" id="col11" />
    </label>
    <label>col3
    <input type="text" name="col3[]" id="col12" />
    </label>
</p>
  <p>
    <label>col1
    <input type="text" name="col1[]" id="col13" />
    </label>
    <label>col2
    <input type="text" name="col2[]" id="col14" />
    </label>
    <label>col3
    <input type="text" name="col3[]" id="col15" />
    </label>
</p>
  <p>
    <label>col1
    <input type="text" name="col1[]" id="col16" />
    </label>
    <label>col2
    <input type="text" name="col2[]" id="col17" />
    </label>
    <label>col3
    <input type="text" name="col3[]" id="col18" />
    </label>
</p>

 <p><input type="submit" name="Submit" id="Submit" value="Submit" /></p>

</form>
So I now have arrays col1[] col2[] col3[]

Hmm...

so have created a mutlidimentional array
Code:
$new_array = array(($_REQUEST['col1']),($_REQUEST['col2']),($_REQUEST['col3']));
__________________
Thanks... Simon

Sex, Drugs & Linux Rules
Send a message via MSN to maeltar
maeltar is offline  
Reply With Quote