mysql query working in xamp but not in server

62 Views Asked by At

I installed master login system in php, it works perfect in XAMMP but in server it gives error in register page:

"There was an error ! Please try again !"

if(($db->query("INSERT INTO `".MLS_PREFIX."users` SET ?u", $user_data)) && ($id = $db->insertId()) && ($db->query("INSERT INTO `".MLS_PREFIX."privacy` SET `userid` = ?i", $id)) && ($db->query("INSERT INTO `".MLS_PREFIX."privacy1` SET `chart` = '1', `vip` = '1', `userid` = ?i", $id))) {
      $page->success = 1;
      $_SESSION['user'] = $id;
      $user = new User($db);
    } else
      $page->error = "There was an error ! Please try again !";
1

There are 1 best solutions below

0
On

Don not include the dot in the backtics; the correct syntax is:

`dbname`.`tablename`