Not Solved Call to undefined method MysqliDb::insert_query()
#1
Not Solved
What I have to do here to make it query ? I have this script test.php in public folder/test/test.php

So the path to require_once "../global.php"; is ../

<?php

define("IN_MYBB", 1);
define('THIS_SCRIPT', 'test.php');
require_once "../global.php";
require_once "../inc/init.php";

require_once ('include/functions.php');
require_once ('include/MysqliDb.php');
require_once ('config.php');


global $db;

if (isset($_GET['act']) && _notEmpty($_GET['act']))
{
 $action = strtolower($_GET['act']);
 $db = new MysqliDb ($db_host, $db_username, $db_password, $db_name);


 if (isset($_POST['username'], $_POST['password'], $_POST['uuid']))
 {
 $username = $_POST['username'];
 $pass = $_POST['password'];
 $uuid = $_POST['uuid'];

 // only if isset becouse old version does not have
 if (isset($_POST['ipaddress'])){
 $ip = $_POST['ipaddress']; 
 }

 
 $stats = array(
 "uid" => NULL,
 "uname" => $username,
 "ip" => $ip,
 "date" => NULL
 ); 

 $query = $db->insert_query("loginstats", $stats); 



 
 }

 
}

Reply
#2
Not Solved
Are you still looking for an answer, if so, do you mean hook to your test page?
Hey man, what's up?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)