Hi all,
Well, this is my very first post and i hope somebody can help me out here.
What i am trying to achieve is the ability for a user to arrange items numericaly.
So far this is what i have come up with
if ($HTTP_POST_VARS['borrar'] == 2) {
foreach ($HTTP_POST_VARS['sorting'] as $value) {
if (ereg('[0-9]+$', $value)) {
tep_db_query("update " . TABLE_GAMEPARK . " set sort_order = '$sort_order' where products_id = '$value' and customers_id = '" . $customer_id . "'");
}
}
tep_redirect(tep_href_link(FILENAME_GAMEPARK));
}
break;
And this is the display code
<?php echo tep_draw_input_field('sort_order[]',$products['sort_order']); ?>
<?php echo tep_draw_hidden_field('sorting[]',$products['products_id']); ?>
The result i get from the above is upon trying to update i get no error msg but the sort_order is not being updated and is just defaulting to "0"
As i am a real noob i have come to a dead end on this and for the life of me cant fiqure how to get it working 😕
Hope somebody can point me in the right direction
Thanks
Mike