求高手帮我看看代码
帮我看下代码吧,谢谢了。
就是一个简单的登陆文件Login.php,语法没有问题,不知道是否是逻辑有问题,很简单的逻辑啊。
每次运行的结果都是“欢迎使用医院挂号门诊系统!”。
这个文件的参数都是从一个简单的HTML文件用post方法传来的。
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--><!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtm11/DTD/xhtml1-transitional.dtd"><html><head> <title>医院门诊系统</title> <meta http-equiv="content-type" content="text/html; charset=utf-8" /></head><body><?php $user = $_POST['user']; $passwd = $_POST['password']; if ((!isset($user)) || (!isset($passwd))) {?> <p>请输入用户名或密码</p> <form method="post" action="Login.php"> <table id="atable"> <tr> <td>用户名:</td><td><input type="text" name="user" /></td> </tr> <tr> <td>密码:</td><td><input type="password" name="password" /></td> </tr> </table> <input type="submit" value="登陆" style="width:100px;height:20px" /> </form><?php } else { $mysql = mysqli_connect("127.0.0.1","clinicadmin","clinicadmin"); if (!$mysql) { echo"无法连接服务器,登陆失败。"; exit; } $selected=mysqli_select_db($mysql, "clinic"); if (!$selected) { echo"连接服务器失败,登陆无效。"; exit; } $query = "select count(*) from user where account='".$user."' and password='".$passwd."'"; $result = mysqli_query($mysql, $query); if (!$result) { echo"无法登陆!"; exit; } $row=mysqli_fetch_row($result); $count=$row[0]; if ($count=1) { echo"<h2>欢迎使用医院挂号门诊系统!</h2>"; } else { echo"<p>用户名或密码错误!</p>
<div class="aritcle_card">
<a class="aritcle_card_img" href="/xiazai/code/11148">
<img src="https://img.php.cn/upload/webcode/000/000/004/176511600273314.png" alt="WeWedding婚纱影楼小程序">
</a>
<div class="aritcle_card_info">
<a href="/xiazai/code/11148">WeWedding婚纱影楼小程序</a>
<p>婚纱影楼小程序提供了一个连接用户与影楼的平台,相当于影楼在微信的官网。它能帮助影楼展示拍摄实力,记录访客数据,宣传优惠活动。使用频率高,方便传播,是影楼在微信端宣传营销的得力助手。功能特点:样片页是影楼展示优秀摄影样片提供给用户欣赏并且吸引客户的。套系页是影楼根据市场需求推出的不同套餐,用户可以按照自己的喜好预定套系。个人中心可以查看用户预约的拍摄计划,也可以获取到影楼的联系方式。</p>
<div class="">
<img src="/static/images/card_xiazai.png" alt="WeWedding婚纱影楼小程序">
<span>0</span>
</div>
</div>
<a href="/xiazai/code/11148" class="aritcle_card_btn">
<span>查看详情</span>
<img src="/static/images/cardxiayige-3.png" alt="WeWedding婚纱影楼小程序">
</a>
</div>
"; } }?></body></html>
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
C++高性能并发应用_C++如何开发性能关键应用
Java AI集成Deep Java Library_Java怎么集成AI模型部署
Golang后端API开发_Golang如何高效开发后端和API
Python异步并发改进_Python异步编程有哪些新改进
C++系统编程内存管理_C++系统编程怎么与Rust竞争内存安全
Java GraalVM原生镜像构建_Java怎么用GraalVM构建高效原生镜像
Python FastAPI异步API开发_Python怎么用FastAPI构建异步API
C++现代C++20/23/26特性_现代C++有哪些新标准特性如modules和coroutines
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号