Home >php教程 >PHP源码 >Shopping cart session receives value and accumulates

Shopping cart session receives value and accumulates

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-08-04 08:53:371384browse
跳至 [1] [全屏预览]
	if(!@in_array($_GET['id'],$_SESSION['id']))
			{
				$_SESSION['sum'][] = $_POST['num'];
				$_SESSION['id'][] = $_GET['id'];
				
			}
			else
			{
				$kk = array_search($_GET['id'],$_SESSION['id']);
				$_SESSION['sum'][$kk] += $_POST['num'];
			}
Statement:
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