newbie here (I'm not gonna lie), doing some side-work project. Issue is i'm making arduino send data to localhost (xampp) to Innodb table, and everything is working OK. Now the problem is i cant query db, cant get no return info that my db/table exist using php.

I tried several php codes, just to give me info "yes table exist". But nothing worked so far. Even deleted xampp and reinstalled everything form scratch.

here is my table:


any help would be appreciated.

  • Hi, and welcome to dba.se! What happens if you connect through the mysql CLI? Can you see the tables? Are you connecting to the correct database/schema? Jun 19 at 12:53

1 Answer 1


Here it is (thx for reply)

    $servername = "localhost";
    $database = "sensor";
    $username = "root";
    $password = "";

    // Create connection
    $conn = new mysqli($servername, $username, $password, $database);
    // Check connection
    if ($conn->connect_error) {
    die("Connection failed: " .$conn->connect_error);
     echo "Connected successfully";

->   connect_error) { die("Connection failed: " . $conn->connect_error); } echo "Connected successfully"; ?>   <-

every other code same thing @ same spot rest of code is just print out

Thank you

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.