<?php

ini_set('include_path', '../_class/');
include('class_sql.php');
if ($_SERVER['HTTP_HOST'] == 'badmintoncoach.hu') $sql = new sql('bc_mysql','root','','badminton_coach');
else $sql = new sql('localhost','tollashodos','uprRscU8bGpJ','tollashodos');

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);

?>
