1
0
mirror of https://github.com/cydrobolt/polr.git synced 2024-09-19 23:21:47 +02:00

Update api.php

This commit is contained in:
Cydrobolt 2014-03-09 08:03:32 -04:00
parent 7a1f4b80db
commit 2ac5efc7dd

View File

@ -1,8 +1,6 @@
<?php
//API CONFIGURATION BELOW
//no vars yet
//POLR API - by http://github.com/cydrobolt/polr
require_once('req.php'); //Fetch Config
@ -18,9 +16,9 @@ else {
//checking API key:
$query = "SELECT valid FROM api WHERE apikey='$apikey'";
$result = $mysqli->query($query) or showerror();
$numrows = $result->num_rows;
$row = mysqli_fetch_assoc($result);
//check if valid
if(!$numrows) {
if(!$row['valid']) {
$api_key_valid = 0;
}
else {