adding items on a input box and a checkbox.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am having difficulty thingking how can i both add a quantity on a item, 
and at the same time detect if my clients did check the box.

Like this:
http://dev.axishift.com/php/qtybox/qtybox.html

Here's the code i did, on how to catch the checkbox:

### code ###
foreach ($_GET as $varname => $value)
$parameters[$varname] = $value;

if (empty($parameters["add"]))
{
die("Incorrect parameters");
exit;
} 

foreach($parameters as $itemName => $itemValue)
{

if ($itemValue == "add") {
end;
} else {

$itemExists = "select count(*) from catchorders_pending where uniqueID = 
'$itemValue'";
$itemExists_result = $dbData->getOne($itemExists);

if ($itemExists_result == 0) {
$insertData = $dbData->query("INSERT INTO catchorders_pending (uid,uniqueID) 
values ('$uid','$itemValue')");
} else {
//print("exist: $itemValue");
}; // end if exist

}; // end if itemvalue

}; // end of foreach
### code ###

Is it possible to add a input box, where i can add ex: quantity of items and 
at the same time they can check the box? is it possible on my code?

please help!.
-- 
Louie Miranda
http://www.axishift.com -- under development

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux