SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 131 | Next

Nirav Mehta

"Mobile Web Development"

php" method="POST">

"processOrders" />
    ';
    foreach($pendingOrders as $order)
    {
    $date = date("m/d/y h:i", strtotime($order['orderDate']));
    Chapter 6
    [ 101 ]
    echo '
  • checked="checked" value="'.$order['id'].'"/>
    '.$order['id'].' ('.$date.') $'.$order['total'].' />'.$order['address1'].' '.$order['address2'].',
    '.$order['city'].' '.$order['phone'].'
  • ';
    }
    echo '
name="option" value="Update Orders" />
';
}
else
{
echo '

No pending orders to process. Check again.

';
}
?>
3. When we run the code, it will show up as in the following screenshot.
4. Once the form is submitted, we will get the selected orders' IDs in the
$orderIds array. We can loop over this, and call the UpdateStatus method to
change the status in the table. We add the following code right after creating
$orderObj in processOrders.inc.php.
// If we got order IDs to process, do that
if ($_REQUEST['orderIds'])
{
echo "

Processing...

";
$updated = 0;
foreach($_REQUEST['orderIds'] as $orderId)
{
$ordObj->Load($orderId);
// Change the status to 'Processing.


Pages:
119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143
żaluzje, rolety Again Lyrics Książki informatyczne Karpacz Wiadomości sportowe