php 简易购物习题
2016-06-29 19:45
543 查看
1.货物界面
View Code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>无标题文档</title> <style type="text/css"> #main{ width:100%} #left{ width:20%; float:left} #right{ width:80%; float:left} </style> </head> <body> <?php session_start(); if(empty($_SESSION["uid"])) { header("location:gouwu2.php"); exit; } include("DBDA.php"); $db=new DBDA(); $uid=$_SESSION["uid"]; $sql="select account from login where username='{$uid}'"; $yue=$db->StrQuery($sql); ?> <div id="main"> <div id="left"> <div><a href="gouwu.php">浏览商品</a></div> <div><a href="gouwu4.php">查看账户</a></div> <div><a href="gouwu3.php">查看购物车</a></div> </div> <div id="right"> 您的账户余额为:<?php echo $yue ?>元 </div> </div> </body> </html>
View Code
相关文章推荐
- PHP基础知识系统复习
- PHP数组、日期、文件的简单使用
- Ecos model
- 插入数据是的时候出现错误解决办法:MassAssignmentException in Model.php line 407: username
- PHP获取客户端和服务器端IP
- Storm OutputCollector并发问题导致NullPointerException的解决
- FTP的主动模式与被动模式
- php 代码片段
- Think PHP(TP)框架的基本使用 (二)
- PHP实现单向链表解决约瑟夫环问题
- Yii2.0 实现的短信发送
- PHP之面向对象的程序设计(一)
- 利用saltstack批量安装php
- Laravel5.1 启动详解
- 安装matplotlib出错
- FTPConnectionClosedException
- 3.使用ThinkPHP时表单action提交地址的格式
- TP问题汇总
- yii2 Pjax的使用
- Thinkphp3.2添加QQ互联和新浪微博一键登录功能