id=my_form
, а потом document.getElementById('my_form').submit()
<input type=file id=my_files name=files multiple>
и formData.append("files", document.getElementById('my_files').value);
. И вывод лучше через console.dir(xhr)
. else:
$errors['success']="Пользователь радостно создан. Аллилуя!";
<form method="get" action="http://127.0.0.1:6605/spawned/AuthSrv.1.612051978/test/create_account">
<input type=hidden name='userCenter' value='17'>
<input type=hidden name='effectiveUntil' value=''>
<input type=hidden name='loginNameValidated' value='1'>
<div class="form-group">
<label>User *</label>
<input type="text" name="userName" class="form-control" required="">
</div>
<div class="form-group">
<label>E-Mail *</label>
<input type="text" name="loginName" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp" required="">
</div>
<div class="form-group">
<label>Password *</label>
<input type="password" name="password" class="form-control" required="">
</div>
<div class="form-group">
<label>Repeat Password *</label>
<input type="password" name="cPassword" class="form-control" id="exampleInputPassword1" required="">
</div>
<div class="row" id="button">
<div class="col">
<button id="signup" type="submit" class="btn btn-success my-2">REGISTER</button>
</div>
</div>
</form>
$connect = mysqli_connect($db_host,$db_user,$db_password,$db_base);
if ($connect->connect_error) {
die('Ошибка: ('. $connect->connect_errno .') '. $connect->connect_error);
}
$result = mysqli_query($connect, "SELECT id,rent,current FROM electriciti ORDER BY id");
$n = mysqli_num_rows($result);
echo "<table border=1>\n<tr><th>ID</th><th>Тариф</th><th>Текущие показания</th></tr>\n";
while ($i = mysqli_fetch_assoc($result)){
echo "<tr><td>{$i['id']}</td><td>{$i['rent']}</td><td>{$i['current']}</td></tr>\n";
}
echo "</table>\n";