Hi guys,
I've hit a wall again with this code and I'm sureit's something simple I'm doing wrong, I just can't see it.


// form action
$link=sqlite_open('data/3002.sqlite ',0666,$sqliteerror);
sqlite_query($link,"INSERT INTO holding(item)
sqlite_query($link,"DELETE FROM '$asset' WHERE item= '$item'");

// open page display div   
echo"<div class='image_pane'>";

// fetch data from db table 
$link=sqlite_open('data/3002.sqlite ',0666,$sqliteerror);
$res=sqlite_query($link,"SELECT * FROM chest");

// form with images as inputs
    <form action='ins.php' method='post'>
    <input type='hidden' name='asset' value='chest'>
    <input type='hidden' name='item' value='".$img."'>
    <input type='image' src='images/".$img.".png' border='0'>

// close div
echo" </div>";


The display part works fine, 5 images shown, the problem is in the form action script,
click on any image, and only the last in line is acted on. i.e the images are: food, torch, knife, scarf, key.
Click on food, and key is removed from the 'chest' table and inserted into 'holding'.
Whichever one is clicked, it's only the right hand one is dealt with.
Something simple...probably.

I knew it was something I was missing... added 'ORDER BY item' to sqlite query line 18 and it all works as required