V
V
Vladimir2019-10-23 12:53:47
MySQL
Vladimir, 2019-10-23 12:53:47

Why are there question marks when writing Russian text to mysql?

Good afternoon. Here is the code. Thank you.

<form action="/create-tender" method="POST">
          <input type="text" name="category" id="category">
    			<input type="text" name="description" placeholder="Опишите подробнее..">    				  						
    			<button class="add-tender" type="submit">Создать</button>
          <button class="tender-list">Все тендеры</button>
        </form>

app.post('/create-tender', function(req,res) {
  let category = req.body.category;
  let description = req.body.description;
  
  connection.query("INSERT INTO tenders (category,description) VALUES('" + category + "','" + description + "')", function(err,res) {
          	
    if(err) console.log(err);
            	
    else {
      console.log(description)
    }

  });

});

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question