<?php 

$dir = '../../';

require_once $dir.'includes/main.php';

$errors = array();

$index_title = clean($_POST['index_title']);
$register_title = clean($_POST['register_title']);
$login_title = clean($_POST['login_title']);
$submit_title = clean($_POST['submit_title']);
$categories_title = clean($_POST['categories_title']);
$dashboard_title = clean($_POST['dashboard_title']);
$stats_title = clean($_POST['stats_title']);
$points_title = clean($_POST['points_title']);

query("UPDATE _settings SET index_title = '{$index_title}', register_title = '{$register_title}', login_title = '{$login_title}', submit_title = '{$submit_title}', categories_title = '{$categories_title}', stats_title = '{$stats_title}', dashboard_title = '{$dashboard_title}', points_title = '{$points_title}'");

// send success
$message = array('message' => "SEO updated successfully. Thank you");
echo json_encode($message);

?>