note 21788 deleted from function.abs by didou
| From: | didou@php.net | Date: | Wed, 23 Jul 2003 01:39:02 +0000 |
| Subject: | note 21788 deleted from function.abs by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-52487@lists.php.net to get a copy of this message | ||
Note Submitter: king_twinkie@NOSPAM.twinkie.com
----
This makes for an easy way to make sure people don't try something funny in your shopping cart
scripts like setting QTY to a negative value:
if you're calculating something like ...
$item_cost * $item_qty = $total_item_cost;
$total_item_cost will be negative and it'll subtract from the total cost of their purchase. :D
Probably not what you want and something easy to overlook if you're not used to completely QA
testing your apps.
You probably came up with some other way to do it, but if you did something more than an
abs($item_qty), you might consider just using abs().