[eluser]Bionicjoe[/eluser]
Code:
Array (
[outageid] => 1 [ticketnumber] => INC000000000001
[servicename] => Array ( [0] => Video )
[location] => Array ( [0] => Columbus [1] => Lexington )
[impact] => 16000
[starttime] =>
[endtime] =>
[summary] => Sample Ticket 1 [details] => These are some details.
)
This is how I get the above array.
Code:
if (is_array($_POST))
{
foreach ($_POST['servicename'] as $data)
{
//$_POST['servicename'] = $data['servicename'];
$data = $this->input->post('serviccename');
}
foreach ($_POST['location'] as $data)
{
//$_POST['location'] = $data['location'];
$data = $this->input->post('location'); //array('location' => $location);
}
Servicename & location cause problems in the SQL UPDATE statement because they are arrays.
Quote:Unknown column 'Array' in 'field list'