Answers for "how to solve php mysqli_query function problem does not execute"

PHP
0

how to solve php mysqli_query function problem does not execute

<?php
$con = mysqli_connect("localhost", "root", "", "test");
if (mysqli_connect_errno()) {
  printf("Connect failed: %s\n", mysqli_connect_error());
  exit();
}

$query = "INSERT INTO files VALUES (NULL, 5, 'hello')";
echo "<pre>Debug: $query</pre>\m";
$result = mysqli_query($con, $query);
if ( false===$result ) {
  printf("error: %s\n", mysqli_error($con));
}
else {
  echo 'done.';
}
Posted by: Guest on May-20-2020

Code answers related to "how to solve php mysqli_query function problem does not execute"

Browse Popular Code Answers by Language