Home > php教程 > PHP源码 > PHP购物车

PHP购物车

PHP中文网
Release: 2016-05-25 17:13:29
Original
1192 people have browsed it

        跳至                        

<?php session_start();
 $conn=mysql_connect("localhost","root","admin");
 mysql_select_db("songyu");
 //检查数组元素出现次数
 function check_count($array,$element)
 {
 	$times=0;
 	for($i=0;$i
Copy after login


<?php session_start();
 $conn=mysql_connect("localhost","root","admin");
 mysql_select_db("songyu");
 $sql="select * from user where username=&#39;".$_POST["username"]."&#39; and password=&#39;".$_POST["password"]."&#39;";
 $result=mysql_query($sql);
 $out=mysql_fetch_array($result);
 if(!$out)
 {
 	echo "wrong!";
 }
 else
 {
 	$_SESSION["user"]=$out[id];
 	echo "
Copy after login

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 Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template