Добрый день. Помогите, пожалуйста, найти ошибку: данные формы не поступают в таблицу.
const pool = mysql.createPool({
connectionLimit: 5,
host: "localhost",
user: "root",
database: "usersdb2",
password: "lomovoi7"
});
app.post("/two.html", urlencodedParser, function (req, res) {
if(!req.body) return res.sendStatus(400);
const name = req.body.name;
const usluga = req.body.usluga;
const tel = req.body.tel;
pool.query("INSERT INTO users (name, usluga, tel) VALUES (?,?,?)", [name, usluga, tel], function(err, data) {
if(err) return console.log(err);
res.redirect("/");
});
});
<form action="/two.html" method="post">
<p style="display: inline;">
<input type="text" name="name" placeholder="Имя" required style="border-style: inset; border-radius: 4px; height: 5vh;">
</p>
<p style="display: inline; margin-left: .5em;">
<input type="text" name="usluga" placeholder="Услуга" required style="border-style: inset; border-radius: 4px; height: 5vh;">
</p>
<p style="display: inline; margin-left: .5em;">
<input type="tel" name="tel" placeholder="Телефон" required style="border-style: inset; border-radius: 4px; height: 5vh;">
</p>
<button type="submit" style="border: 2px black outset; border-radius: 4px; height: 5vh;">Позвоните мне!</button>
</form>
Это отрывок из общего кода, чтобы было легче увидеть проблему.