我正在尝试从Home.html和服务器端从数据库中获取数据,我已经捕获了sql查询,但是在这里,我将数据的逻辑打印在下一页上,请告诉我该逻辑如何显示数据在同一页面上
预先感谢...
主页:
<form action='/home/search' method="POST" onsubmit="return myFunction()">
<input type ="text" id='search' name='search' placeholder="Search">
<button type= "submit">Search</button>
</form>
服务器端:
app.post('/home/search' , function(req,res){
console.log(req.body);
console.log(req.body.searchid);
console.log(req.body);
const sql = "select * from users_info where Name NOT LIKE
'${req.body.search}%' ";
mysqlConnection.query(sql,function(err,result){
}