1<?php
2$con = mysqli_connect("localhost", "root", "", "test");
3if (mysqli_connect_errno()) {
4 printf("Connect failed: %s\n", mysqli_connect_error());
5 exit();
6}
7
8$query = "INSERT INTO files VALUES (NULL, 5, 'hello')";
9echo "<pre>Debug: $query</pre>\m";
10$result = mysqli_query($con, $query);
11if ( false===$result ) {
12 printf("error: %s\n", mysqli_error($con));
13}
14else {
15 echo 'done.';
16}