Fix variable name, change include to require
This commit is contained in:
parent
f65958a859
commit
6cb4dc7429
1 changed files with 3 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
include_once("config.php");
|
||||
require_once("config.php");
|
||||
|
||||
$conn = new mysqli($servername, $username, $password, $dbname);
|
||||
|
||||
|
@ -10,8 +10,8 @@ if ($conn->connect_error) {
|
|||
|
||||
$sql = "CREATE TABLE tracker ( ts TIMESTAMP PRIMARY KEY DEFAULT CURRENT_TIMESTAMP, lat DOUBLE, lon DOUBLE );";
|
||||
|
||||
if (!mysqli_query($con,$sql)) {
|
||||
die('Error: ' . mysqli_error($con));
|
||||
if (!mysqli_query($conn, $sql)) {
|
||||
die('Error: ' . mysqli_error($conn));
|
||||
}
|
||||
|
||||
mysqli_close($conn);
|
||||
|
|
Loading…
Reference in a new issue