Very frustrating - I got this to work minus having the order_status_name appear in the history, it was a blank box.
Now that I come back to it later tonight - nothing works at all - what gives?!
PHP Code:
<td align="left" valign="middle"><?php
echo zen_draw_form('auto_update', '/index.php', '', 'get', '', true);
echo zen_draw_input_field('auto_update', '', 'size="6"');
echo zen_draw_hidden_field('auto_update', $oID);
// the order status name is blank on the update
if(isset($_POST['oID']) ){
$orders_status = $db->Execute("UPDATE " . TABLE_ORDERS . " SET orders_status='4' where orders_id='" . $oID . "'");
$orders_status_history = $db->Execute("INSERT into " . TABLE_ORDERS_STATUS_HISTORY . "
(orders_id, orders_status_id, date_added, customer_notified, comments)
values ('" . (int)$oID . "',
'" . zen_db_input($status) . "',
now(),
'" . zen_db_input($customer_notified) . "',
(SELECT IFNULL(admin_initials, '') FROM admin WHERE admin_id='" .$_SESSION["admin_id"] ."'))");
}
?>
<?php
echo '</form>'; ?>
<br />Update to Pulled</td>
</td>
Bookmarks