[eluser]davewilly[/eluser]
Hi people, firstly this is my first post so Iw ould like to say it's a pleasure to be here.
I am submitting a form that POSTs a gallery_id to a controller. The first thing I did in the controller was to dump the POST data. This is what I get
Code:
array(3) { ["gallery_id_x"]=> string(2) "13" ["gallery_id_y"]=> string(2) "15" ["gallery_id"]=> string(1) "2" }
It seems CI is posting 2 further x & y extensions of my gallery_id, I think they might be something to do wih the fact the my input type is an image. Below is my code in the view.
Code:
<?php
foreach($gallerys as $gallery) {
// Compile form data
$fdata = array(
'name' => 'gallery_id',
'value' => $gallery['id'],
'type' => 'image',
'src' => base_url() . 'images/admin/delete.png',
'alt' => 'Delete ' . $gallery['name'] . ' Gallery'
);
// Build output
$output = '<tr class="data">' . "\n";
$output .= "\t" . '<td>' . $gallery['id'] . '</td><td>'
. anchor('admin/galleries', $gallery['name'], array('title' => $gallery['name']))
. '</td><td>' . $gallery['count']
. '</td><td class="delete">' . form_input($fdata) . '</td>';
$output .= '</tr>';
// Print
echo $output;
} // End foreach
?>
Could anybody please enlighten me.
Thanks
Dave