很抱歉这显示为重复,但是查看所有其他内容,解释只是没有点击,我已经阅读了几个月,我是网络开发的新战斗员,所以请查看我的代码和帮助
我的html表单将数据传递给我的PHP脚本,该脚本显示良好的回显,但仍然存在错误,不会插入到我的MSQLi数据库中 - 它会收到错误undefined index
和undefined variable
。我已阅读所有帖子,但似乎无法找到或可能不理解解释。
这是PHP回声:
Array
(
[Engineers] => xxxxxx
[Location] => Office
[Site] => xxxxxxxx
[date] => 24-01-2016
[CallRef] => inc00353
[ADDCallRef] => 0
[ADCDrive] => 736547
[ADDDrive] => 365765
[ADEDrive] => 756
[ADMemory] => 7
[LNCDrive] => 567
[LNDDrive] => 675
[LNEDrive] => 65755
[LNFDrive] => 567
[LNGDrive] => 65756
[LNMemory] => 7
[SCDrive] => 567
[SDDrive] => 567
[SEDrive] => 567
[SMemory] => 567
[GPMSDB] => 567567
[GPMSLog] => 567
[GPMSBackups] => Array
(
[0] => Good
)
[ETSDB] => 567567
[ETSLog] => 567
[ETSBackups] => Array
(
[0] => Good
)
[CMSDB] => 567
[CMSLog] => 567
[CMSBackups] => Array
(
[0] => Good
)
[ETSAppsetrig] => Array
(
[0] => Running
)
[ETSAppspc] => Array
(
[0] => Running
)
[ETSAppsedtcont] => Array
(
[0] => Running
)
[ETSAppshub] => Array
(
[0] => Running
)
[ETSAppsiesna] => Array
(
[0] => Running
)
[ETSAppsexti] => Array
(
[0] => Running
)
[ETSAppscs] => Array
(
[0] => Running
)
[ETSAppsInt] => Array
(
[0] => Running
)
[ETSAppscmssh] => Array
(
[0] => Running
)
[GPMSAppsgtrig] => Array
(
[0] => Running
)
[GPMSAppsgsmet] => Array
(
[0] => Running
)
[GPMSAppsgcinst] => Array
(
[0] => Running
)
[GPMSAppsgmif] => Array
(
[0] => Running
)
[GPMSAppsgmcs] => Array
(
[0] => Running
)
[GPMSAppsghist] => Array
(
[0] => Running
)
[GPMSAppsgop] => Array
(
[0] => Running
)
[GPMSAppsgext] => Array
(
[0] => Running
)
[GPMSAppsngc] => Array
(
[0] => Running
)
[GPMSAppsedl] => Array
(
[0] => Running
)
[ETSApps14] => Array
(
[0] => Running
)
[ETSAppsfms] => Array
(
[0] => Running
)
[Xsecfdin] => Array
(
[0] => Running
)
[Xsecfdout] => Array
(
[0] => Running
)
[Xsecfder] => Array
(
[0] => Running
)
[Xsecfdarc] => Array
(
[0] => Running
)
[Xsecdfein] => Array
(
[0] => Running
)
[Xsecfeout] => Array
(
[0] => Running
)
[Xsecfeer] => Array
(
[0] => Running
)
[Xsecfearc] => Array
(
[0] => Running
)
[Xsecfpdi] => Array
(
[0] => Running
)
[Xsecfpdo] => Array
(
[0] => Running
)
[Xsecfpder] => Array
(
[0] => Running
)
[Xsecfpdarc] => Array
(
[0] => Running
)
[Xsecfpei] => Array
(
[0] => Running
)
[Xsecfpeo] => Array
(
[0] => Running
)
[Xsecfpee] => Array
(
[0] => Running
)
[Xsecfpearc] => Array
(
[0] => Running
)
[ADAppEvents] => Array
(
[0] => Good
)
[ADSysEvents] => Array
(
[0] => Good
)
[GPMSAppEvents] => Array
(
[0] => Good
)
[GPMSSysEvents] => Array
(
[0] => Good
)
[ETSAppEvents] => Array
(
[0] => Good
)
[ETSSysEvents] => Array
(
[0] => Running
)
[GPMSMSMQ] => Array
(
[0] => Running
)
[ETSMSMQ] => Array
(
[0] => Running
)
[comments] => qreytyteyrtywrtytrywrtywrtywrtywrtyrtwywryyrtyrwywtrywrtywrtywrtywrtyrtywrtytywrywrtywrty
)
注意,数组条目是复选框,日期来自datepicker。
这是我的PHP:
<?php //echo '<pre>'; print_r($_POST); echo '</pre>'; exit;
if(isset($_POST["submit"]))
$mysqli = new mysqli("localhost", "XXXXXXX", "XXXXXXXX", "XXXXXXXXXXXX");
/* check connection */
if (mysqli_connect_errno()) {
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
}
$Engineers = db_quote ($_POST['Engineers']);
$Location = db_quote ($_POST['Location']);
$Site = db_quote ($_POST['Site']);
$Date = db_quote ($_POST['Date']);
$CallRef = db_quote ($_POST['CallRef']);
$ADDCallRef = db_quote ($_POST['ADDCallRef']);
$ADCDrive = db_quote ($_POST['ADCDrive']);
$ADDDrive = db_quote ($_POST['ADDDrive']);
$ADEDrive = db_quote ($_POST['ADEDrive']);
$ADMemory = db_quote ($_POST['ADMemory']);
$NCdrive = db_quote ($_POST['NCdrive']);
$NDDrive = db_quote ($_POST['NDDrive']);
$NEDrive = db_quote ($_POST['NEDrive']);
$NMemory = db_quote ($_POST['NMemory']);
$SCDrive = db_quote ($_POST['SCDrive']);
$SEDrive = db_quote ($_POST['SEDrive']);
$SMemory = db_quote ($_POST['SMemory']);
$GPMSDB = db_quote ($_POST['GPMSDB']);
$GPMSLog = db_quote ($_POST['GPMSLog']);
$GPMSBackups = db_quote ($_POST['GPMSBackups']);
$ETSDB = db_quote ($_POST['ETSDB']);
$ETSLog = db_quote ($_POST['ETSLog']);
$ETSBackups = db_quote ($_POST['ETSBackups']);
$CMSDB = db_quote ($_POST['CMSDB']);
$CMSLog = db_quote ($_POST['CMSLog']);
$CMSBackup = db_quote ($_POST['CMSBackup']);
$ETSAppspc = db_quote ($_POST['ETSAppspc']);
$ETSAppsedtcont = db_quote ($_POST['ETSAppsedtcont']);
$ETSAppshub = db_quote ($_POST['ETSAppshub']);
$ETSAppsies = db_quote ($_POST['ETSAppsies']);
$ETSAppsexti = db_quote ($_POST['ETSAppsexti']);
$ETSAppscs = db_quote ($_POST['ETSAppscs']);
$ETSAppsint = db_quote ($_POST['ETSAppsint']);
$ETSAppscmssh = db_quote ($_POST['ETSAppscmssh']);
$GPMSAppsgtrig = db_quote ($_POST['GPMSAppsgtrig']);
$GPMSAppsgcmet = db_quote ($_POST['GPMSAppsgcmet']);
$GPMSAppsgcinst = db_quote ($_POST['GPMSAppsgcinst']);
$GPMSAppsgmig = db_quote ($_POST['GPMSAppsgmig']);
$GPMSAppsgmcs = db_quote ($_POST['GPMSAppsgmcs']);
$GPMSAppsghist = db_quote ($_POST['GPMSAppsghist']);
$GPMSAppsgop = db_quote ($_POST['GPMSAppsgop']);
$GPMSAppsgext = db_quote ($_POST['GPMSAppsgext']);
$GPMSAppsngc = db_quote ($_POST['GPMSAppsngc']);
$GPMSAppsedl = db_quote ($_POST['GPMSAppsedl']);
$ETSApps14 = db_quote ($_POST['ETSApps14']);
$ETSAppsfms = db_quote ($_POST['ETSAppsfms']);
$XSecfdin = db_quote ($_POST['XSecfdin']);
$XSecfdout = db_quote ($_POST['XSecfdout']);
$XSecfder = db_quote ($_POST['XSecfder']);
$XSecfein = db_quote ($_POST['XSecfein']);
$XSecfeout = db_quote ($_POST['XSecfeout']);
$XSecfeer = db_quote ($_POST['XSecfeer']);
$XSecfdarc = db_quote ($_POST['XSecfdarc']);
$XSecfearc = db_quote ($_POST['XSecfearc']);
$XSecfpdi = db_quote ($_POST['XSecfpdi']);
$XSecfpdo = db_quote ($_POST['XSecfpdo']);
$XSecfpder = db_quote ($_POST['XSecfpder']);
$XSecfpdarc = db_quote ($_POST['XSecfpdarc']);
$XSecfpei = db_quote ($_POST['XSecfpei']);
$XSecfpeo = db_quote ($_POST['XSecfpeo']);
$XSecfpee = db_quote ($_POST['XSecfpee']);
$XSecpearc = db_quote ($_POST['XSecpearc']);
$ADAppEvents = db_quote ($_POST['ADAppEvents']);
$ADSysEvents = db_quote ($_POST['ADSysEvents']);
$GAppEvents = db_quote ($_POST['GAppEvents']);
$GSysEvents = db_quote ($_POST['GSysEvents']);
$eAppEvents = db_quote ($_POST['eAppEvents']);
$ETSAppstrig = db_quote ($_POST['ETSAppstrig']);
$MSMQ = db_quote ($_POST['MSMQ']);
$Comments = db_quote ($_POST['Comments']);
// Check connection
//if($link === false){
// die("ERROR: Could not connect. " . mysqli_connect_error());
// }
if (mysqli_query($link, $sql = "INSERT INTO `XXXXXXXXXX`(`XXXXXXXXXXXX_id`, `Engineers`, `Location`, `Site`, `date`, `CallRef`, `ADDCallRef`, `ADCDrive`, `ADDDrive`, `ADEDrive`, `ADMemory`, `LNCDrive`, `LNDDrive`, `LNEDrive`, `LNFDrive`, `LNGDrive`, `LNMemory`,
`SCDrive`, `SDDrive`, `SEDrive`, `SMemory`, `GPMSDB`, `GPMSLog`, `GPMSBackups`, `ETSDB`, `ETSLog`, `ETSBackups`, `CMSDB`, `CMSLog`, `CMSBackups`, `ETSAppsetrig`, `ETSAppspc`, `ETSAppsedtcont`, `ETSAppshub`, `ETSAppsiesna`, `ETSAppsexti`,
`ETSAppscs`, `ETSAppsInt`, `ETSAppscmssh`, `GPMSAppsgtrig`, `GPMSAppsgsmet`, `GPMSAppsgcinst`, `GPMSAppsgmif`, `GPMSAppsgmcs`, `GPMSAppsghist`, `GPMSAppsgop`, `GPMSAppsgext`, `GPMSAppsngc`, `GPMSAppsedl`, `ETSApps14`, `ETSAppsfms`,
`Xsecfdin`, `Xsecfdout`, `Xsecfder`, `Xsecfdarc`, `Xsecdfein`, `Xsecfeout`, `Xsecfeer`, `Xsecfearc`, `Xsecfpdi`, `Xsecfpdo`, `Xsecfpder`, `Xsecfpdarc`, `Xsecfpei`, `Xsecfpeo`, `Xsecfpee`, `Xsecfpearc`, `ADAppEvents`, `ADSysEvents`,
`GPMSAppEvents`, `GPMSSysEvents`, `ETSAppEvents`, `ETSSysEvents`, `GPMSMSMQ`, `ETSMSMQ`, `comments`) VALUES (`$Engineers`, `$Location`, `$Site`, `$Date`, `$CallRef`, `$ADDCallRef`, `$ADCDrive`, `$ADDDrive`, `$ADEDrive`, `$ADMemory`, `
$NCdrive`, `$NDDrive`, `$NEDrive`, `$NMemory`, `$SCDrive`, `$SEDrive`, `$SMemory`, `$GPMSDB`, `$GPMSLog`, `$GPMSBackups`, `$ETSDB`, `$ETSLog`, `$ETSBackups`, `$CMSDB`, `$CMSLog`, `$CMSBackup`, `$ETSAppspc`, `$ETSAppsedtcont`, `
$ETSAppshub`, `$ETSAppsies`, `$ETSAppsexti`, `$ETSAppscs`, `$ETSAppsint`, `$ETSAppscmssh`, `$GPMSAppsgtrig`, `$GPMSAppsgcmet`, `$GPMSAppsgcinst`, `$GPMSAppsgmig`, `$GPMSAppsgmcs`, `$GPMSAppsghist`, `$GPMSAppsgop`, `$GPMSAppsgext`, `
$GPMSAppsngc`, `$GPMSAppsedl`, `$ETSApps14`, `$ETSAppsfms`, `$XSecfdin`, `$XSecfdout`, `$XSecfder`, `$XSecfein`, `$XSecfeout`, `$XSecfeer`, `$XSecfdarc`, `$XSecfearc`, `$XSecfpdi`, `$XSecfpdo`, `$XSecfpder`, `$XSecfpdarc`, `$XSecfpei`,
`$XSecfpeo`, `$XSecfpee`, `$XSecpearc`, `$ADAppEvents`, `$ADSysEvents`, `$GAppEvents`, `$GSysEvents`, `$eAppEvents`, `$ETSAppstrig`, `$MSMQ`, `$Comments')")){
printf("%d Row inserted.\n", mysqli_affected_rows($link));
}
if(mysqli_query($link, $sql)){
echo "Records added successfully.";
} else{
echo "ERROR: Could not able to execute $sql. " . mysqli_error($link);
}
// close connection
mysqli_close($link);
?>
以下是错误:
*( ! ) Notice: Undefined index: Date in C:\wamp\www\XXXXXXXX.php on line 15
Call Stack
# Time Memory Function Location
1 0.0000 346912 {main}( ) ..\XXXXXXXX.php:0
( ! ) Notice: Undefined index: NCdrive in C:\wamp\www\XXXXXXXX.php on line 22
Call Stack
# Time Memory Function Location
1 0.0000 346912 {main}( ) ..\XXXXXXXX.php:0
( ! ) Notice: Undefined index: NDDrive in C:\wamp\www\XXXXXXXX.php on line 23
Call Stack
# Time Memory Function Location
1 0.0000 346912 {main}( ) ..\XXXXXXXX.php:0
( ! ) Notice: Undefined index: NEDrive in C:\wamp\www\XXXXXXXX.php on line 24
Call Stack
# Time Memory Function Location
1 0.0000 346912 {main}( ) ..\XXXXXXXX.php:0
( ! ) Notice: Undefined index: NMemory in C:\wamp\www\XXXXXXXX.php on line 25
Call Stack
# Time Memory Function Location
1 0.0000 346912 {main}( ) ..\XXXXXXXX.php:0
( ! ) Notice: Undefined index: CMSBackup in C:\wamp\www\XXXXXXXX.php on line 37
Call Stack
# Time Memory Function Location
1 0.0000 346912 {main}( ) ..\XXXXXXXX.php:0
( ! ) Notice: Undefined index: ETSAppsies in C:\wamp\www\XXXXXXXX.php on line 41
Call Stack
# Time Memory Function Location
1 0.0000 346912 {main}( ) ..\XXXXXXXX.php:0
( ! ) Notice: Undefined index: ETSAppsint in C:\wamp\www\XXXXXXXX.php on line 44
Call Stack
# Time Memory Function Location
1 0.0000 346912 {main}( ) ..\XXXXXXXX.php:0
( ! ) Notice: Undefined index: GPMSAppsgcmet in C:\wamp\www\XXXXXXXX.php on line 47
Call Stack
# Time Memory Function Location
1 0.0000 346912 {main}( ) ..\XXXXXXXX.php:0
( ! ) Notice: Undefined index: GPMSAppsgmig in C:\wamp\www\XXXXXXXX.php on line 49
Call Stack
# Time Memory Function Location
1 0.0000 346912 {main}( ) ..\XXXXXXXX.php:0
( ! ) Notice: Undefined index: XSecfdin in C:\wamp\www\XXXXXXXX.php on line 58
Call Stack
# Time Memory Function Location
1 0.0000 346912 {main}( ) ..\XXXXXXXX.php:0
( ! ) Notice: Undefined index: XSecfdout in C:\wamp\www\XXXXXXXX.php on line 59
Call Stack
# Time Memory Function Location
1 0.0000 346912 {main}( ) ..\XXXXXXXX.php:0
( ! ) Notice: Undefined index: XSecfder in C:\wamp\www\XXXXXXXX.php on line 60
Call Stack
# Time Memory Function Location
1 0.0000 346912 {main}( ) ..\XXXXXXXX.php:0
( ! ) Notice: Undefined index: XSecfein in C:\wamp\www\XXXXXXXX.php on line 61
Call Stack
# Time Memory Function Location
1 0.0000 346912 {main}( ) ..\XXXXXXXX.php:0
( ! ) Notice: Undefined index: XSecfeout in C:\wamp\www\XXXXXXXX.php on line 62
Call Stack
# Time Memory Function Location
1 0.0000 346912 {main}( ) ..\XXXXXXXX.php:0
( ! ) Notice: Undefined index: XSecfeer in C:\wamp\www\XXXXXXXX.php on line 63
Call Stack
# Time Memory Function Location
1 0.0000 346912 {main}( ) ..\XXXXXXXX.php:0
( ! ) Notice: Undefined index: XSecfdarc in C:\wamp\www\XXXXXXXX.php on line 64
Call Stack
# Time Memory Function Location
1 0.0000 346912 {main}( ) ..\XXXXXXXX.php:0
( ! ) Notice: Undefined index: XSecfearc in C:\wamp\www\XXXXXXXX.php on line 65
Call Stack
# Time Memory Function Location
1 0.0000 346912 {main}( ) ..\XXXXXXXX.php:0
( ! ) Notice: Undefined index: XSecfpdi in C:\wamp\www\XXXXXXXX.php on line 66
Call Stack
# Time Memory Function Location
1 0.0000 346912 {main}( ) ..\XXXXXXXX.php:0
( ! ) Notice: Undefined index: XSecfpdo in C:\wamp\www\XXXXXXXX.php on line 67
Call Stack
# Time Memory Function Location
1 0.0000 346912 {main}( ) ..\XXXXXXXX.php:0
( ! ) Notice: Undefined index: XSecfpder in C:\wamp\www\XXXXXXXX.php on line 68
Call Stack
# Time Memory Function Location
1 0.0000 346912 {main}( ) ..\XXXXXXXX.php:0
( ! ) Notice: Undefined index: XSecfpdarc in C:\wamp\www\XXXXXXXX.php on line 69
Call Stack
# Time Memory Function Location
1 0.0000 346912 {main}( ) ..\XXXXXXXX.php:0
( ! ) Notice: Undefined index: XSecfpei in C:\wamp\www\XXXXXXXX.php on line 70
Call Stack
# Time Memory Function Location
1 0.0000 346912 {main}( ) ..\XXXXXXXX.php:0
( ! ) Notice: Undefined index: XSecfpeo in C:\wamp\www\XXXXXXXX.php on line 71
Call Stack
# Time Memory Function Location
1 0.0000 346912 {main}( ) ..\XXXXXXXX.php:0
( ! ) Notice: Undefined index: XSecfpee in C:\wamp\www\XXXXXXXX.php on line 72
Call Stack
# Time Memory Function Location
1 0.0000 346912 {main}( ) ..\XXXXXXXX.php:0
( ! ) Notice: Undefined index: XSecpearc in C:\wamp\www\XXXXXXXX.php on line 73
Call Stack
# Time Memory Function Location
1 0.0000 346912 {main}( ) ..\XXXXXXXX.php:0
( ! ) Notice: Undefined index: GAppEvents in C:\wamp\www\XXXXXXXX.php on line 76
Call Stack
# Time Memory Function Location
1 0.0000 346912 {main}( ) ..\XXXXXXXX.php:0
( ! ) Notice: Undefined index: GSysEvents in C:\wamp\www\XXXXXXXX.php on line 77
Call Stack
# Time Memory Function Location
1 0.0000 346912 {main}( ) ..\XXXXXXXX.php:0
( ! ) Notice: Undefined index: eAppEvents in C:\wamp\www\XXXXXXXX.php on line 78
Call Stack
# Time Memory Function Location
1 0.0000 346912 {main}( ) ..\XXXXXXXX.php:0
( ! ) Notice: Undefined index: ETSAppstrig in C:\wamp\www\XXXXXXXX.php on line 79
Call Stack
# Time Memory Function Location
1 0.0000 346912 {main}( ) ..\XXXXXXXX.php:0
( ! ) Notice: Undefined index: MSMQ in C:\wamp\www\XXXXXXXX.php on line 80
Call Stack
# Time Memory Function Location
1 0.0000 346912 {main}( ) ..\XXXXXXXX.php:0
( ! ) Notice: Undefined index: Comments in C:\wamp\www\XXXXXXXX.php on line 81
Call Stack
# Time Memory Function Location
1 0.0000 346912 {main}( ) ..\XXXXXXXX.php:0
( ! ) Notice: Undefined variable: link in C:\wamp\www\XXXXXXXX.php on line 98
Call Stack
# Time Memory Function Location
1 0.0000 346912 {main}( ) ..\XXXXXXXX.php:0
( ! ) Notice: Array to string conversion in C:\wamp\www\XXXXXXXX.php on line 108
Call Stack
# Time Memory Function Location
1 0.0000 346912 {main}( ) ..\XXXXXXXX.php:0
( ! ) Notice: Array to string conversion in C:\wamp\www\XXXXXXXX.php on line 108
Call Stack
# Time Memory Function Location
1 0.0000 346912 {main}( ) ..\XXXXXXXX.php:0
( ! ) Notice: Array to string conversion in C:\wamp\www\XXXXXXXX.php on line 108
Call Stack
# Time Memory Function Location
1 0.0000 346912 {main}( ) ..\XXXXXXXX.php:0
( ! ) Notice: Array to string conversion in C:\wamp\www\XXXXXXXX.php on line 110
Call Stack
# Time Memory Function Location
1 0.0000 346912 {main}( ) ..\XXXXXXXX.php:0
( ! ) Notice: Array to string conversion in C:\wamp\www\XXXXXXXX.php on line 110
Call Stack
# Time Memory Function Location
1 0.0000 346912 {main}( ) ..\XXXXXXXX.php:0
( ! ) Notice: Array to string conversion in C:\wamp\www\XXXXXXXX.php on line 110
Call Stack
# Time Memory Function Location
1 0.0000 346912 {main}( ) ..\XXXXXXXX.php:0
( ! ) Notice: Array to string conversion in C:\wamp\www\XXXXXXXX.php on line 110
Call Stack
# Time Memory Function Location
1 0.0000 346912 {main}( ) ..\XXXXXXXX.php:0
( ! ) Notice: Array to string conversion in C:\wamp\www\XXXXXXXX.php on line 110
Call Stack
# Time Memory Function Location
1 0.0000 346912 {main}( ) ..\XXXXXXXX.php:0
( ! ) Notice: Array to string conversion in C:\wamp\www\XXXXXXXX.php on line 110
Call Stack
# Time Memory Function Location
1 0.0000 346912 {main}( ) ..\XXXXXXXX.php:0
( ! ) Notice: Array to string conversion in C:\wamp\www\XXXXXXXX.php on line 110
Call Stack
# Time Memory Function Location
1 0.0000 346912 {main}( ) ..\XXXXXXXX.php:0
( ! ) Notice: Array to string conversion in C:\wamp\www\XXXXXXXX.php on line 110
Call Stack
# Time Memory Function Location
1 0.0000 346912 {main}( ) ..\XXXXXXXX.php:0
( ! ) Notice: Array to string conversion in C:\wamp\www\XXXXXXXX.php on line 110
Call Stack
# Time Memory Function Location
1 0.0000 346912 {main}( ) ..\XXXXXXXX.php:0
( ! ) Notice: Array to string conversion in C:\wamp\www\XXXXXXXX.php on line 110
Call Stack
# Time Memory Function Location
1 0.0000 346912 {main}( ) ..\XXXXXXXX.php:0
( ! ) Notice: Array to string conversion in C:\wamp\www\XXXXXXXX.php on line 112
Call Stack
# Time Memory Function Location
1 0.0000 346912 {main}( ) ..\XXXXXXXX.php:0
( ! ) Notice: Array to string conversion in C:\wamp\www\XXXXXXXX.php on line 112
Call Stack
# Time Memory Function Location
1 0.0000 346912 {main}( ) ..\XXXXXXXX.php:0
( ! ) Notice: Array to string conversion in C:\wamp\www\XXXXXXXX.php on line 112
Call Stack
# Time Memory Function Location
1 0.0000 346912 {main}( ) ..\XXXXXXXX.php:0
( ! ) Notice: Array to string conversion in C:\wamp\www\XXXXXXXX.php on line 112
Call Stack
# Time Memory Function Location
1 0.0000 346912 {main}( ) ..\XXXXXXXX.php:0
( ! ) Notice: Array to string conversion in C:\wamp\www\XXXXXXXX.php on line 112
Call Stack
# Time Memory Function Location
1 0.0000 346912 {main}( ) ..\XXXXXXXX.php:0
( ! ) Notice: Array to string conversion in C:\wamp\www\XXXXXXXX.php on line 114
Call Stack
# Time Memory Function Location
1 0.0000 346912 {main}( ) ..\XXXXXXXX.php:0
( ! ) Notice: Array to string conversion in C:\wamp\www\XXXXXXXX.php on line 114
Call Stack
# Time Memory Function Location
1 0.0000 346912 {main}( ) ..\XXXXXXXX.php:0
( ! ) Warning: mysqli_query() expects parameter 1 to be mysqli, null given in C:\wamp\www\XXXXXXXX.php on line 114
Call Stack
# Time Memory Function Location
1 0.0000 346912 {main}( ) ..\XXXXXXXX.php:0
2 0.0312 356368 mysqli_query ( ) ..\XXXXXXXX.php:114
( ! ) Notice: Undefined variable: link in C:\wamp\www\XXXXXXXX.php on line 121
Call Stack
# Time Memory Function Location
1 0.0000 346912 {main}( ) ..\XXXXXXXX.php:0
( ! ) Warning: mysqli_query() expects parameter 1 to be mysqli, null given in C:\wamp\www\XXXXXXXX.php on line 121
Call Stack
# Time Memory Function Location
1 0.0000 346912 {main}( ) ..\XXXXXXXX.php:0
2 0.0312 356368 mysqli_query ( ) ..\XXXXXXXX.php:121
( ! ) Notice: Undefined variable: link in C:\wamp\www\XXXXXXXX.php on line 127
Call Stack
# Time Memory Function Location
1 0.0000 346912 {main}( ) ..\XXXXXXXX.php:0
( ! ) Warning: mysqli_error() expects parameter 1 to be mysqli, null given in C:\wamp\www\XXXXXXXX.php on line 127
Call Stack
# Time Memory Function Location
1 0.0000 346912 {main}( ) ..\XXXXXXXX.php:0
2 0.0312 357960 mysqli_error ( ) ..\XXXXXXXX.php:127
ERROR: Could not able to execute INSERT INTO `fellside`(`Dailychecks_id`, `Engineers`, `Location`, `Site`, `date`, `CallRef`, `ADDCallRef`, `ADCDrive`, `ADDDrive`, `ADEDrive`, `ADMemory`, `LNCDrive`, `LNDDrive`, `LNEDrive`, `LNFDrive`, `LNGDrive`, `LNMemory`, `SCDrive`, `SDDrive`, `SEDrive`, `SMemory`, `GPMSDB`, `GPMSLog`, `GPMSBackups`, `ETSDB`, `ETSLog`, `ETSBackups`, `CMSDB`, `CMSLog`, `CMSBackups`, `ETSAppsetrig`, `ETSAppspc`, `ETSAppsedtcont`, `ETSAppshub`, `ETSAppsiesna`, `ETSAppsexti`, `ETSAppscs`, `ETSAppsInt`, `ETSAppscmssh`, `GPMSAppsgtrig`, `GPMSAppsgsmet`, `GPMSAppsgcinst`, `GPMSAppsgmif`, `GPMSAppsgmcs`, `GPMSAppsghist`, `GPMSAppsgop`, `GPMSAppsgext`, `GPMSAppsngc`, `GPMSAppsedl`, `ETSApps14`, `ETSAppsfms`, `Xsecfdin`, `Xsecfdout`, `Xsecfder`, `Xsecfdarc`, `Xsecdfein`, `Xsecfeout`, `Xsecfeer`, `Xsecfearc`, `Xsecfpdi`, `Xsecfpdo`, `Xsecfpder`, `Xsecfpdarc`, `Xsecfpei`, `Xsecfpeo`, `Xsecfpee`, `Xsecfpearc`, `ADAppEvents`, `ADSysEvents`, `GPMSAppEvents`, `GPMSSysEvents`, `ETSAppEvents`, `ETSSysEvents`, `GPMSMSMQ`, `ETSMSMQ`, `comments`) VALUES (`Gordon Coates`, `Office`, `Fellside`, ``, `inc00353`, `0`, `736547`, `365765`, `756`, `7`, ` `, ``, ``, ``, `567`, `567`, `567`, `567567`, `567`, `Array`, `567567`, `567`, `Array`, `567`, `567`, ``, `Array`, `Array`, ` Array`, ``, `Array`, `Array`, ``, `Array`, `Array`, ``, `Array`, ``, `Array`, `Array`, `Array`, `Array`, ` Array`, `Array`, `Array`, `Array`, ``, ``, ``, ``, ``, ``, ``, ``, ``, ``, ``, ``, ``, ``, ``, ``, `Array`, `Array`, ``, ``, ``, ``, ``, `').
( ! ) Notice: Undefined variable: link in C:\wamp\www\XXXXXXXX.php on line 135
Call Stack
# Time Memory Function Location
1 0.0000 346912 {main}( ) ..\XXXXXXXX.php:0
( ! ) Warning: mysqli_close() expects parameter 1 to be mysqli, null given in C:\wamp\www\XXXXXXXX.php on line 135
Call Stack
# Time Memory Function Location
1 0.0000 346912 {main}( ) ..\XXXXXXXX.php:0
2 0.0468 356368 mysqli_close ( ) ..\XXXXXXXX.php:135*
答案 0 :(得分:0)
可能你可以试试这段代码:)
<?php
if(isset($_POST["submit"]))
$link = mysqli_connect("localhost", "XXXXXXX", "XXXXXXXX", "XXXXXXXXXXXX");
$Engineers = $_POST['Engineers'];
$Location = $_POST['Location'];
$Site = $_POST['Site'];
$Date = $_POST['Date'];
$CallRef = $_POST['CallRef'];
$ADDCallRef = $_POST['ADDCallRef'];
$ADCDrive = $_POST['ADCDrive'];
$ADDDrive = $_POST['ADDDrive'];
$ADEDrive = $_POST['ADEDrive'];
$ADMemory = $_POST['ADMemory'];
$NCdrive = $_POST['NCdrive'];
$NDDrive = $_POST['NDDrive'];
$NEDrive = $_POST['NEDrive'];
$NMemory = $_POST['NMemory'];
$SCDrive = $_POST['SCDrive'];
$SEDrive = $_POST['SEDrive'];
$SMemory = $_POST['SMemory'];
$GPMSDB = $_POST['GPMSDB'];
$GPMSLog = $_POST['GPMSLog'];
$GPMSBackups = $_POST['GPMSBackups'];
$ETSDB = $_POST['ETSDB'];
$ETSLog = $_POST['ETSLog'];
$ETSBackups = $_POST['ETSBackups'];
$CMSDB = $_POST['CMSDB'];
$CMSLog = $_POST['CMSLog'];
$CMSBackup = $_POST['CMSBackup'];
$ETSAppspc = $_POST['ETSAppspc'];
$ETSAppsedtcont = $_POST['ETSAppsedtcont'];
$ETSAppshub = $_POST['ETSAppshub'];
$ETSAppsies = $_POST['ETSAppsies'];
$ETSAppsexti = $_POST['ETSAppsexti'];
$ETSAppscs = $_POST['ETSAppscs'];
$ETSAppsint = $_POST['ETSAppsint'];
$ETSAppscmssh = $_POST['ETSAppscmssh'];
$GPMSAppsgtrig = $_POST['GPMSAppsgtrig'];
$GPMSAppsgcmet = $_POST['GPMSAppsgcmet'];
$GPMSAppsgcinst = $_POST['GPMSAppsgcinst'];
$GPMSAppsgmig = $_POST['GPMSAppsgmig'];
$GPMSAppsgmcs = $_POST['GPMSAppsgmcs'];
$GPMSAppsghist = $_POST['GPMSAppsghist'];
$GPMSAppsgop = $_POST['GPMSAppsgop'];
$GPMSAppsgext = $_POST['GPMSAppsgext'];
$GPMSAppsngc = $_POST['GPMSAppsngc'];
$GPMSAppsedl = $_POST['GPMSAppsedl'];
$ETSApps14 = $_POST['ETSApps14'];
$ETSAppsfms = $_POST['ETSAppsfms'];
$XSecfdin = $_POST['XSecfdin'];
$XSecfdout = $_POST['XSecfdout'];
$XSecfder = $_POST['XSecfder'];
$XSecfein = $_POST['XSecfein'];
$XSecfeout = $_POST['XSecfeout'];
$XSecfeer = $_POST['XSecfeer'];
$XSecfdarc = $_POST['XSecfdarc'];
$XSecfearc = $_POST['XSecfearc'];
$XSecfpdi = $_POST['XSecfpdi'];
$XSecfpdo = $_POST['XSecfpdo'];
$XSecfpder = $_POST['XSecfpder'];
$XSecfpdarc = $_POST['XSecfpdarc'];
$XSecfpei = $_POST['XSecfpei'];
$XSecfpeo = $_POST['XSecfpeo'];
$XSecfpee = $_POST['XSecfpee'];
$XSecpearc = $_POST['XSecpearc'];
$ADAppEvents = $_POST['ADAppEvents'];
$ADSysEvents = $_POST['ADSysEvents'];
$GAppEvents = $_POST['GAppEvents'];
$GSysEvents = $_POST['GSysEvents'];
$eAppEvents = $_POST['eAppEvents'];
$ETSAppstrig = $_POST['ETSAppstrig'];
$MSMQ = $_POST['MSMQ'];
$Comments = $_POST['Comments'];
$sql = "INSERT INTO `XXXXXXXXXX`(`XXXXXXXXXXXX_id`, `Engineers`, `Location`, `Site`, `date`, `CallRef`, `ADDCallRef`, `ADCDrive`, `ADDDrive`, `ADEDrive`, `ADMemory`, `LNCDrive`, `LNDDrive`, `LNEDrive`, `LNFDrive`, `LNGDrive`, `LNMemory`,
`SCDrive`, `SDDrive`, `SEDrive`, `SMemory`, `GPMSDB`, `GPMSLog`, `GPMSBackups`, `ETSDB`, `ETSLog`, `ETSBackups`, `CMSDB`, `CMSLog`, `CMSBackups`, `ETSAppsetrig`, `ETSAppspc`, `ETSAppsedtcont`, `ETSAppshub`, `ETSAppsiesna`, `ETSAppsexti`,
`ETSAppscs`, `ETSAppsInt`, `ETSAppscmssh`, `GPMSAppsgtrig`, `GPMSAppsgsmet`, `GPMSAppsgcinst`, `GPMSAppsgmif`, `GPMSAppsgmcs`, `GPMSAppsghist`, `GPMSAppsgop`, `GPMSAppsgext`, `GPMSAppsngc`, `GPMSAppsedl`, `ETSApps14`, `ETSAppsfms`,
`Xsecfdin`, `Xsecfdout`, `Xsecfder`, `Xsecfdarc`, `Xsecdfein`, `Xsecfeout`, `Xsecfeer`, `Xsecfearc`, `Xsecfpdi`, `Xsecfpdo`, `Xsecfpder`, `Xsecfpdarc`, `Xsecfpei`, `Xsecfpeo`, `Xsecfpee`, `Xsecfpearc`, `ADAppEvents`, `ADSysEvents`,
`GPMSAppEvents`, `GPMSSysEvents`, `ETSAppEvents`, `ETSSysEvents`, `GPMSMSMQ`, `ETSMSMQ`, `comments`) VALUES (`$Engineers`, `$Location`, `$Site`, `$Date`, `$CallRef`, `$ADDCallRef`, `$ADCDrive`, `$ADDDrive`, `$ADEDrive`, `$ADMemory`, `
$NCdrive`, `$NDDrive`, `$NEDrive`, `$NMemory`, `$SCDrive`, `$SEDrive`, `$SMemory`, `$GPMSDB`, `$GPMSLog`, `$GPMSBackups`, `$ETSDB`, `$ETSLog`, `$ETSBackups`, `$CMSDB`, `$CMSLog`, `$CMSBackup`, `$ETSAppspc`, `$ETSAppsedtcont`, `
$ETSAppshub`, `$ETSAppsies`, `$ETSAppsexti`, `$ETSAppscs`, `$ETSAppsint`, `$ETSAppscmssh`, `$GPMSAppsgtrig`, `$GPMSAppsgcmet`, `$GPMSAppsgcinst`, `$GPMSAppsgmig`, `$GPMSAppsgmcs`, `$GPMSAppsghist`, `$GPMSAppsgop`, `$GPMSAppsgext`, `
$GPMSAppsngc`, `$GPMSAppsedl`, `$ETSApps14`, `$ETSAppsfms`, `$XSecfdin`, `$XSecfdout`, `$XSecfder`, `$XSecfein`, `$XSecfeout`, `$XSecfeer`, `$XSecfdarc`, `$XSecfearc`, `$XSecfpdi`, `$XSecfpdo`, `$XSecfpder`, `$XSecfpdarc`, `$XSecfpei`,
`$XSecfpeo`, `$XSecfpee`, `$XSecpearc`, `$ADAppEvents`, `$ADSysEvents`, `$GAppEvents`, `$GSysEvents`, `$eAppEvents`, `$ETSAppstrig`, `$MSMQ`, `$Comments')"
$result = mysqli_query($link, $sql);
if ($result){
// $result is true
printf("%d Row inserted.\n", mysqli_affected_rows($link));
echo "Records added successfully.";
}
else{
// $result is false
echo "ERROR: Could not able to execute $sql. " . mysqli_error($link);
}
?>