Home > php教程 > PHP源码 > body text

Shopping cart session receives value and accumulates

WBOY
Release: 2016-08-04 08:53:37
Original
1330 people have browsed it
跳至 [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'];
			}
Copy after login
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 Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template