fix: 修复会话启动位置以避免重复启动
将 session_start() 移到文件开头,避免在显示预约成功信息时重复启动会话
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
// pending_bookings.php - 待预约页面,处理WPS表单数据
|
// pending_bookings.php - 待预约页面,处理WPS表单数据
|
||||||
|
session_start();
|
||||||
require_once 'db_connect.php';
|
require_once 'db_connect.php';
|
||||||
|
|
||||||
// 处理表单提交
|
// 处理表单提交
|
||||||
@@ -273,7 +274,6 @@ try {
|
|||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<!-- 预约成功信息显示 -->
|
<!-- 预约成功信息显示 -->
|
||||||
<?php if (session_status() === PHP_SESSION_NONE) session_start(); ?>
|
|
||||||
<?php if (isset($_SESSION['booking_success_msg'])): ?>
|
<?php if (isset($_SESSION['booking_success_msg'])): ?>
|
||||||
<div class="booking-success">
|
<div class="booking-success">
|
||||||
<h3>预约成功信息已生成</h3>
|
<h3>预约成功信息已生成</h3>
|
||||||
|
|||||||
Reference in New Issue
Block a user