I have a system that is outputting a number of images, with a A link next to them to set them as the album cover.
I have multiple albums, and in my database have a field called "is_feature" that is set to 1 if the image is the cover, and 0 if it isnt.
I don't know the best way of selecting the image, i originally outputted something like below;
<a href="/admin/set_photo/'.$image_id.'" title="Set this photo as the feature photo">Set</a>
Are you trying to do this?
<a href="/admin/set_photo?var1=<?php echo $image_id;?>&var2=<?php echo $size;?>" title="Set this photo as the feature photo">Set</a>
Then in the controller, use the variables passsed like this :
$iamge_id = $this->input->get('var1'); $image_size = $this->input->get('var2');