[eluser]tim1965[/eluser]
Tomcode
Yes i have put the submit button into the foreach so that it displays when the image description field is called. This is to try and ensure that only one field description change is made at a time and so i can associate the description with the image name i.e. put a big button next to the text field marked Update.
The issue is that on submit (doing it this way) i need to combine $_POST['photodesc'] with
$_POST['image_name'] and then strip out all blank values for photodesc. $_POST array below.
Quote:
array(3) { ["photodesc"]=> array(8) { [0]=> string(48) "Need to associate this value with the image_name" [1]=> string(0) "" [2]=> string(0) "" [3]=> string(0) "" [4]=> string(0) "" [5]=> string(0) "" [6]=> string(0) "" [7]=> string(0) "" } ["image_name"]=> array(8) { [0]=> string(16) "e68RDq2YqQYX.jpg" [1]=> string(16) "vgtVJX2PdpZY.jpg" [2]=> string(16) "wKwrwYtj75VM.jpg" [3]=> string(16) "3gGx5tpBhJh5.jpg" [4]=> string(16) "HPmlICUPQzqS.jpg" [5]=> string(16) "jSh1pxyFS1Rh.jpg" [6]=> string(16) "SiQD7TZ1dV8g.jpg" [7]=> string(16) "7n822ZfGyilB.jpg" } ["update_photo_desc"]=> string(18) "Update Description" }
Quote:
So the issue is how do i ensure the text in photodesc[0] is associated with the image_name[0]
NOTE the element postitions will always be correct so photodesc[0]=image_name[0].
So my plea for help is how to do this, or am i flogging a dead camel(apologies to all camels out there) by taking this approach and is there a more elegant way to approach this. Thanks