mysql - PHP form size truncate -
i trying save data via form
. when submit form, number of data 45 when try information in post request save it, number becomes 39 , don't know why.
has idea?
here code use save date in database:
$config = new jconfig(); $mysqli = mysqli_connect($config->host, $config->user, $config->password, $config->db); $users = $_post['user']; foreach($users $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])."' `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])."' `id`= ".$id; if(!mysqli_query($mysqli, $queryuser)){ printf("erreur : %s\n", mysqli_sqlstate($mysqli)); } }
here form :
<form action="userssave.php" id="formcommercants" method="post"> <table class="table table-hover table-condensed"> <thead> <tr> <th><?php echo "n° stand"; ?></th> <th><?php echo "société"; ?></th> <th><?php echo "rue et numéro"; ?></th> <th><?php echo "npa et lieu"; ?></th> <th><?php echo "téléphone fixe"; ?></th> <th><?php echo "téléphone portable"; ?></th> <th><?php echo "adresse de courriel"; ?></th> <th><?php echo "site internet"; ?></th> <th><?php echo "domaine d'activité"; ?></th> <th><?php echo "description"; ?></th> <th><?php echo "personne de contact"; ?></th> <th><?php echo "identifiant"; ?></th> <th><?php echo "emplacement espéré"; ?></th> <th><?php echo "stand modulable"; ?></th> <th><?php echo "largeur du stand"; ?></th> <th><?php echo "longueur du stand"; ?></th> <th><?php echo "hauteur du stand"; ?></th> <th><?php echo "surface m2"; ?></th> <th><?php echo "remarques"; ?></th> <th><?php echo "nombre prise 220v"; ?></th> <th><?php echo "nombre prise 380v"; ?></th> <th><?php echo "table"; ?></th> <th><?php echo "bandeau"; ?></th> <th><?php echo "affiches"; ?></th> <th><?php echo "publicité"; ?></th> <th><?php echo "personnes inscrites"; ?></th> <th><?php echo "année"; ?></th> </tr> </thead> <tbody> <?php $mysqli = mysqli_connect($config->host, $config->user, $config->password, $config->db); $query = "select u.id, u.name, u.username, u.email, cb.cb_rue, cb.cb_lieu, cb.cb_tlphonefixe, cb.cb_tlphoneportable, cb.cb_website, cb.cb_domaine, cb.cb_description, cb.cb_contact, cb.cb_emplacementespr, cb.cb_standmodulable, cb.cb_largeurstand, cb.cb_longueurstand, cb.cb_hauteurstand, cb.cb_remarques, cb.cb_prise220v, cb.cb_prise380v, cb.cb_table, cb.cb_bandeau, cb.cb_affiches, cb.cb_publicite, cb.cb_personnesinscrites, cb.cb_annee, cb.cb_no_stand, cb.cb_surface_m2 expo_users u inner join expo_comprofiler cb on u.id = cb.user_id inner join expo_user_usergroup_map uum on u.id = uum.user_id uum.group_id = 2 , cb.cb_annee = ". $year ." order u.name"; $res = mysqli_query($mysqli, $query); while($row = mysqli_fetch_object($res)){ ?> <tr> <td><input type="text" name="user[<?php echo $row->id; ?>][cb_no_stand]" class="input-medium" value="<?php echo $row->cb_no_stand; ?>" required/> </td> <td><input type="text" name="user[<?php echo $row->id; ?>][name]" class="input-medium" value="<?php echo $row->name; ?>" required/> </td> <td><input type="text" name="user[<?php echo $row->id; ?>][cb_rue]" class="input-medium" value="<?php echo $row->cb_rue; ?>"/> </td> <td><input type="text" name="user[<?php echo $row->id; ?>][cb_lieu]" class="input-medium" value="<?php echo $row->cb_lieu; ?>"/> </td> <td><input type="text" name="user[<?php echo $row->id; ?>][cb_tlphonefixe]" class="input-medium" value="<?php echo $row->cb_tlphonefixe; ?>"/> </td> <td><input type="text" name="user[<?php echo $row->id; ?>][cb_tlphoneportable]" class="input-medium" value="<?php echo $row->cb_tlphoneportable; ?>"/> </td> <td><input type="text" name="user[<?php echo $row->id; ?>][email]" class="input-medium" value="<?php echo $row->email; ?>" required/> </td> <td><input type="text" name="user[<?php echo $row->id; ?>][cb_website]" class="input-medium" value="<?php echo $row->cb_website; ?>"/> </td> <td><input type="text" name="user[<?php echo $row->id; ?>][cb_domaine]" class="input-medium" value="<?php echo $row->cb_domaine; ?>"/> </td> <td><input type="text" name="user[<?php echo $row->id; ?>][cb_description]" class="input-medium" value="<?php echo $row->cb_description; ?>"/> </td> <td><input type="text" name="user[<?php echo $row->id; ?>][cb_contact]" class="input-medium" value="<?php echo $row->cb_contact; ?>"/> </td> <td><input type="text" name="user[<?php echo $row->id; ?>][username]" class="input-medium" value="<?php echo $row->username; ?>" required/> </td> <td><input type="text" name="user[<?php echo $row->id; ?>][cb_emplacementespr]" class="input-medium" value="<?php echo $row->cb_emplacementespr; ?>"/> </td> <td><input type="text" name="user[<?php echo $row->id; ?>][cb_standmodulable]" class="input-medium" value="<?php echo $row->cb_standmodulable; ?>"/> </td> <td><input type="text" name="user[<?php echo $row->id; ?>][cb_largeurstand]" class="input-medium" value="<?php echo $row->cb_largeurstand; ?>"/> </td> <td><input type="text" name="user[<?php echo $row->id; ?>][cb_longueurstand]" class="input-medium" value="<?php echo $row->cb_longueurstand; ?>"/> </td> <td><input type="text" name="user[<?php echo $row->id; ?>][cb_hauteurstand]" class="input-medium" value="<?php echo $row->cb_hauteurstand; ?>"/> </td> <td><input type="text" name="user[<?php echo $row->id; ?>][cb_surface_m2]" class="input-medium" value="<?php echo $row->cb_surface_m2; ?>"/> </td> <td><input type="text" name="user[<?php echo $row->id; ?>][cb_remarques]" class="input-medium" value="<?php echo $row->cb_remarques; ?>"/> </td> <td><input type="text" name="user[<?php echo $row->id; ?>][cb_prise220v]" class="input-medium" value="<?php echo $row->cb_prise220v; ?>"/> </td> <td><input type="text" name="user[<?php echo $row->id; ?>][cb_prise380v]" class="input-medium" value="<?php echo $row->cb_prise380v; ?>"/> </td> <td><input type="text" name="user[<?php echo $row->id; ?>][cb_table]" class="input-medium" value="<?php echo $row->cb_table; ?>"/> </td> <td><input type="text" name="user[<?php echo $row->id; ?>][cb_bandeau]" class="input-medium" value="<?php echo $row->cb_bandeau; ?>"/> </td> <td><input type="text" name="user[<?php echo $row->id; ?>][cb_affiches]" class="input-medium" value="<?php echo $row->cb_affiches; ?>"/> </td> <td><input type="text" name="user[<?php echo $row->id; ?>][cb_publicite]" class="input-medium" value="<?php echo $row->cb_publicite; ?>"/> </td> <td><input type="text" name="user[<?php echo $row->id; ?>][cb_personnesinscrites]" class="input-medium" value="<?php echo $row->cb_personnesinscrites; ?>"/> </td> <td><input type="text" name="user[<?php echo $row->id; ?>][cb_annee]" class="input-medium" disabled value="<?php echo $row->cb_annee; ?>"/> </td> </tr> <?php } ?> </tbody> </table> </form>
yes submitting 45 rows each 27 fields (1215 values).
is possible amount of bytes submitting exceed "post_max_size" value in php.ini
try check php.ini on server , increase value of "post_max_size".
Comments
Post a Comment