Welcome Guest, Not a member yet? Register   Sign In
Two unknown x & y variables being sent in POST data!
#1

[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

?&gt;

Could anybody please enlighten me.

Thanks

Dave
#2

[eluser]danmontgomery[/eluser]
This is the X and Y of the image where the click to submit happened.
#3

[eluser]davewilly[/eluser]
[quote author="noctrum" date="1266871960"]This is the X and Y of the image where the click to submit happened.[/quote]

Thankyou Lab Assistant, I see it is the x/y co-ords.




Theme © iAndrew 2016 - Forum software by © MyBB