gpt4 book ai didi

php - 我想将项目代码从 url 传输到数据库

转载 作者:行者123 更新时间:2023-11-28 23:11:11 26 4
gpt4 key购买 nike

<分区>

我想从 url 中获取项目代码并插入到数据库中。但是没有插入项目代码。

<?php

$item_code = $_GET['item_code'];

if (isset($_POST['submit'])) {
$first_name = $_POST['first_name'];
$last_name = $_POST['last_name'];
$email = $_POST['email'];
$phone = $_POST['phone'];
$address = $_POST['address'];
$city = $_POST['city'];
$state = $_POST['state'];
$pincode = $_POST['pincode'];
$item_number = $_POST['item_number'];
$date = $_POST['date'];
$call_time = $_POST['call_time'];
$comment = $_POST['comment'];
$datetime = date_default_timezone_set('Asia/Kolkata');
$datetime = date("l jS \of F Y h:i:s A");



$insert_query = "insert into rlu_order(item_code,first_name,last_name,email,phone,address,city,state,pincode,item_number,date,call_time,comment,datetime) values('$item_code','$first_name','$last_name','$email','$phone','$address','$city','$state','$pincode','$item_number','$date','$call_time','$comment','$datetime')";


if (mysqli_query($con, $insert_query)) {

echo "<script>alert('Thank You for your Project order we will contact you shortly')</script>";
echo "<script>window.open('index.php','_self')</script>";
}
}
?>

我传递的 url 像 'order.php?item_code=$item_code'

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com