php - 提交表单后标题未重定向
问题描述
抱歉,如果询问这个类似的标题不起作用的问题,这是我的代码
<?php
include_once 'config/koneksi.php';
session_start();
// LOGIN
if(isset($_POST['btn_login'])){
$user = $_POST['txt_user'];
$pass = $_POST['txt_pass'];
$select = $pdo->prepare("select * from admin where username='$user' and password='$pass' ");
$select->execute();
$row = $select->fetch(PDO::FETCH_ASSOC);
if($row['username']==$user AND $row['password']==$pass){
$_SESSION['id']=$row['id'];
$_SESSION['username']=$row['username'];
header('location: dashboard/dashboard.php');
exit();
}else{
}
}
?>
这是提交按钮后网址的结果,而不是重定向到仪表板页面
http://localhost/bukutamu/?txt_user=admin&txt_pass=admin&btn_login=
谁能帮我这个?对不起我的英语不好
解决方案
推荐阅读
- python - 防止在 Geonode 上使用相同的登录凭据进行多次登录
- java - Spring Cloud Function 部署为 Azure 功能:日志记录?
- c++ - Cmath 无缘无故地产生 230 多个错误
- c++ - 仅在基于范围的循环中迭代奇数(偶数)元素
- autodesk-forge - Autodesk 查看器全屏在 iOS 上损坏?
- java - Java GC 未清除 SoftReference
- amazon-ec2 - AWS API 网关到内部 Web 服务(一种不公开的 API)
- c++ - 如何通过 lightuserdata 对象将表参数从 lua 传递到 C++?
- angular - scrollIntoView() 角度 7 不滚动
- c - 运行程序时加号中的ASCII字符