<?php
$con = mysqli_connect("localhost", "root", "", "test");
if (mysqli_connect_errno()) {
printf("Connect failed: %s
", 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
", mysqli_error($con));
}
else {
echo 'done.';
}