我已经创建了这个脚本以插入我的数据库但总是有问题注意:未定义的索引:请让我知道为什么我有这个错误。
谢谢
<?php
ob_start();
include("db.php");
if(isset($_POST['send'])!="")
{
$Service_Number=mysql_real_escape_string($_POST['Service_Number']);
$rundate=mysql_real_escape_string($_POST['rundate']);
$Bytes_In=mysql_real_escape_string($_POST['Bytes_In']);
$Bytes_Out=mysql_real_escape_string($_POST['Bytes_Out']);
$Average_Mbps_Upload=mysql_real_escape_string($_POST['Average_Mbps_Upload']);
$Average_Mbps_Download=mysql_real_escape_string($_POST['Average_Mbps_Download']);
$Average_Excess_Mbps=mysql_real_escape_string($_POST['Average_Excess_Mbps']);
$update=mysql_query("INSERT INTO form_element_copy(Service_Number,rundate,Bytes_In,Bytes_Out,Average_Mbps_Upload,Average_Mbps_Download,Average_Excess_Mbps)VALUES
('$Service_Number','$rundate','$Bytes_In','$Bytes_Out','$Average_Mbps_Upload','$Average_Mbps_Download','$Average_Excess_Mbps')");
if($update)
{
$msg="Successfully Updated!!";
echo "<script type='text/javascript'>alert('$msg');</script>";
}
else
{
$errormsg="Something went wrong, Try again";
echo "<script type='text/javascript'>alert('$errormsg');</script>";
}
}
ob_end_flush();
?>