<?php

ini_set('include_path', '../_class/');
include('class_sql.php');
if ($_SERVER['HTTP_HOST'] == 'cegledcoach.hu') $sql = new sql('cegled_mysql','root','','badminton_coach');
else $sql = new sql('localhost','livingsp_coach','R186er012qw5','livingsp_badminton');

if ($_POST['parent_id'] == 'null') {
	return false;
}

$parent_query = "SELECT * FROM user_parent WHERE up_id = " . $_POST['parent_id'];
$parent_assoc_array = $sql->assoc_array($parent_query);
$ret_array = array(
	$parent_assoc_array[0]['up_email'],
	$parent_assoc_array[0]['up_phone'],
	$parent_assoc_array[0]['up_facebook']
	);

echo json_encode($ret_array);

?>
