Home > Backend Development > PHP Tutorial > PHP formhash具体如何做

PHP formhash具体如何做

WBOY
Release: 2016-06-13 12:19:54
Original
1565 people have browsed it

PHP formhash具体怎么做?
我在做一个购物网站遇到个问题。

比如某商品的库存只有1件。
如果这个时候有两个会员同时拍下来的话,就会变成两个订单,这个问题就很严重了,然商家库存只有一件,被拍了两件,

网上搜了下相关资料,发现formhash这个可以解决,但具体不知道怎么写,

谁能用PHP做一个简单的案例吗?
------解决思路----------------------
formhash >> form hash >> 哈希表
想象不出来这个玩意怎么能解决竞争
------解决思路----------------------
formhash貌似是用来防止刷帖机器的
有人下了订单直接数量-1呗,到时间还不付款再返还

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template