0

when I try to connect my HTML page to my MYSQL's database I have these errors.(update down there) enter image description here

UPDATE: it's maybe my configuration of my php.ini. I have find it but he is too long for share it him but idk what i have to do now...a little thing: mysql word is never used in php.ini and i find this weird

PS: I don't know what else I have to say, if you need something tell me ! im using windows 10,mysql 8.0 my code:

<!DOCTYPE html>
<html>
<head>
    <link rel="stylesheet" type="text/css" href="style.css">
    <meta charset="utf-8">
    <title>SHAR-APP</title>
</head>
<body>
    <div class="div1">
        <form action="" class="form" method="POST">
            <div class='div2' id='div2_name'>
                <label for="name">Name of the user:</label>

                <input class ='in'type="text" id="name" name="name" size="20">
            </div>

            <div class='div2' id='div2_code'>
                <label class = 'label' for="name">Code:</label>

                <input class='in' id ='code' type="text" name="code" size="20">
                
            </div>
            <div class="div2" id='b'>
                <input type="submit" name='pressed' value="send" class='button'>
                
            </div>
        </form>
    </div>
    <?php
        echo "test1";
        if (isset($_POST['name'])) {
            echo "test2";

            $mysqli =
mysqli_connect('localhost','project','@Titou2004');
            mysqli_select_db('project_database');
            $requete = 'INSERT INTO envoies VALUES(NULL,"' . $_POST['name'] . '","' . $_POST['code'] . '")';
            $query = "SELECT * FROM envoies";
            echo $_POST['name'];
            echo "test3";
        }
    ?>
    
</body>
</html>

I have tried this : enter image description here

please STOP CLOSE MY QUESTION BECAUSE SHE IS NOT ALREADY ANSWER !!!!!

titoo
  • 55
  • 7
  • 2
    In your last question we gave you a link to another question that explains the problem. That didn't help? – Barmar Aug 16 '21 at 20:21
  • no i have try that but didn't works ... and someone closed my question – titoo Aug 16 '21 at 20:23
  • 1
    And you think posting it again will produce a different result? – Barmar Aug 16 '21 at 20:23
  • I don't understand why someone has done that ... So if you can explain me – titoo Aug 16 '21 at 20:26
  • I also do python and people are a lot more kind over there... here people just want to reduce you and show you that they are better than you – titoo Aug 16 '21 at 20:31
  • What OS are you using? What version of MySQL server? What code do you use to connect that gives this error? Which PHP version? Could you at least link to some of the problems/solutions you already tried? – brombeer Aug 16 '21 at 20:33
  • @brombeer I have update but I don't know how to find my php version but I think its the last version possible – titoo Aug 16 '21 at 20:49
  • i have tried that ```default-authentication-plugin=mysql_native_password```but doesn't work and the first answer is to wait for an update of PHP if my English is not bad and another answer is not correct because some people have been hacked because of that but she has a lot of up vote – titoo Aug 16 '21 at 20:58
  • I have update if you want to see the my.ini – titoo Aug 16 '21 at 21:08
  • Trying to game the system will not get you very far. – kuroi neko Aug 17 '21 at 06:06
  • what this mean ? – titoo Aug 17 '21 at 07:24
  • Welcome to Stack Overflow. Please take the [tour], then read the _entire_ duplicate question and all answers. If that doesn't solve your problem and you still need to ask a new question, that new question should clearly indicate what you have tried and what didn't work. See [ask]. – ChrisGPT was on strike Aug 17 '21 at 18:54
  • And [please don't post screenshots of text](https://meta.stackoverflow.com/a/285557/354577). They can't be searched or copied, or even consumed by users of adaptive technologies like screen readers. Instead, paste the code as text directly into your question. If you select it and click the `{}` button or Ctrl+K the code block will be indented by four spaces, which will cause it to be rendered as code. – ChrisGPT was on strike Aug 17 '21 at 18:58

0 Answers0