A
A
Anton-Pluton2018-07-12 17:10:57
PHP
Anton-Pluton, 2018-07-12 17:10:57

What is the problem with mysqli_set_charset()?

There is a code

include_ONCE("connect_db.php");
  include_once("function.php");

  mysqli_set_charset('utf8');  <------ Ругается на эту строку

  $id = clear_string($_POST['id']);
  $name = clear_string($_POST['name']);
  $good = clear_string($_POST['good']);
  $bad = clear_string($_POST['bad']);
  $comment = clear_string($_POST['comment']);

    mysqli_query ($connection,"INSERT INTO table_reviews(`products_id`,`name`,`good_reviews`,`bad_reviews`,`comment`,`date`)
            VALUES(
                '".$id."',
                '".$name."',
                '".$good."',
                '".$bad."',
                '".$comment."',
                  NOW()
                )");

mysqli_set_charset() expects exactly 2 parameters, 1 given on line 10
I can't figure out what the problem is. Please help great gurus

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DevMan, 2018-07-12
@Anton-Pluton

English in white is written what's the matter.
open php.net/manual/ru/mysqli.set-charset.php , read the description and see examples - it's so difficult.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question