PHP Classes

File: fwphp/glomodul/z_examples/book_video/03steinmetz_2008/ch04_forms/addtocart_process_frm.php

Recommend this page to a friend!
  Classes of Slavko Srakocic  >  B12 PHP FW  >  fwphp/glomodul/z_examples/book_video/03steinmetz_2008/ch04_forms/addtocart_process_frm.php  >  Download  
File: fwphp/glomodul/z_examples/book_video/03steinmetz_2008/ch04_forms/addtocart_process_frm.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: B12 PHP FW
Manage database records with a PDO CRUD interface
Author: By
Last change:
Date: 3 months ago
Size: 706 bytes
 

Contents

Class file image Download
<?php

$ids
= $_POST["ids"];
//$names = $_POST["names"];
$quantities = $_POST["quantities"];

if (
is_array($quantities)) {
  foreach (
$quantities as $key => $item_qty)
  {
   
$item_qty = intval($item_qty);
    if (
$item_qty <> '0') {
     
$id = $ids[$key];
      print
"You added $item_qty of user ID $id - you can log in this user.<br>";
    }
  }
}


/*
$product_id = $_POST["product_id"];
$quantity = $_POST["quantity"];

if (is_array($quantity)) {
    foreach ($quantity as $key => $item_qty) {
        $item_qty = intval($item_qty);
        if ($item_qty > 0) {
            $id = $product_id[$key];
            print "You added $item_qty of Product ID $id.<br>";
        }
    }
}
*/


?>

For more information send a message to info at phpclasses dot org.