我正在尝试通过find
保存数据。当我提交表单时,数据的数量是45,但当我尝试在我的帖子请求中获取信息以保存它时,数字变为39,我不知道为什么。
有人有想法吗?
以下是我用于在数据库中保存日期的代码:
form
以下是表格:
$config = new JConfig();
$mysqli = mysqli_connect($config->host, $config->user, $config->password, $config->db);
$users = $_POST['user'];
foreach($users as $id => $user){
$query ="UPDATE `expo_comprofiler` SET `cb_website`='".mysqli_real_escape_string($mysqli, $user[cb_website])."',
`cb_rue`='".mysqli_real_escape_string($mysqli, $user[cb_rue])."',
`cb_lieu`='".mysqli_real_escape_string($mysqli, $user[cb_lieu])."',
`cb_domaine`='".mysqli_real_escape_string($mysqli, $user[cb_domaine])."',
`cb_contact`='".mysqli_real_escape_string($mysqli, $user[cb_contact])."',
`cb_description`='".mysqli_real_escape_string($mysqli, $user[cb_description])."',
`cb_tlphonefixe`='".mysqli_real_escape_string($mysqli, $user[cb_tlphonefixe])."',
`cb_tlphoneportable`='".mysqli_real_escape_string($mysqli, $user[cb_tlphoneportable])."',
`cb_emplacementespr`='".mysqli_real_escape_string($mysqli, $user[cb_emplacementespr])."',
`cb_standmodulable`='".mysqli_real_escape_string($mysqli, $user[cb_standmodulable])."',
`cb_largeurstand`='".mysqli_real_escape_string($mysqli, $user[cb_largeurstand])."',
`cb_longueurstand`='".mysqli_real_escape_string($mysqli, $user[cb_longueurstand])."',
`cb_hauteurstand`='".mysqli_real_escape_string($mysqli, $user[cb_hauteurstand])."',
`cb_remarques`='".mysqli_real_escape_string($mysqli, $user[cb_remarques])."',
`cb_prise220v`='".mysqli_real_escape_string($mysqli, $user[cb_prise220v])."',
`cb_prise380v`='".mysqli_real_escape_string($mysqli, $user[cb_prise380v])."',
`cb_table`='".mysqli_real_escape_string($mysqli, $user[cb_table])."',
`cb_bandeau`='".mysqli_real_escape_string($mysqli, $user[cb_bandeau])."',
`cb_affiches`='".mysqli_real_escape_string($mysqli, $user[cb_affiches])."',
`cb_publicite`='".mysqli_real_escape_string($mysqli, $user[cb_publicite])."',
`cb_no_stand`='".mysqli_real_escape_string($mysqli, $user[cb_no_stand])."',
`cb_surface_m2`='".mysqli_real_escape_string($mysqli, $user[cb_surface_m2])."',
`cb_personnesinscrites`='".mysqli_real_escape_string($mysqli, $user[cb_personnesinscrites])."'
WHERE `user_id`= ".$id;
?>
<p><?php echo $query ?> </p>
<?php
if(!mysqli_query($mysqli, $query)){
printf("Erreur : %s\n", mysqli_sqlstate($mysqli));
}
$queryUser = "UPDATE `expo_users` SET `name`='".mysqli_real_escape_string($mysqli, $user[name])."',
`username`='".mysqli_real_escape_string($mysqli, $user[username])."',
`email`='".mysqli_real_escape_string($mysqli, $user[email])."'
WHERE `id`= ".$id;
if(!mysqli_query($mysqli, $queryUser)){
printf("Erreur : %s\n", mysqli_sqlstate($mysqli));
}
}
答案 0 :(得分:0)
是的,您提交的是一个45行,每行有27个字段(1215个值)。
您提交的字节数可能超过php.ini中的“post_max_size”值
尝试检查服务器上的php.ini并增加“post_max_size”的值。