school and school_city class
user edit with parent edit included (ajax) city and school connected overview updated
This commit is contained in:
23
_ajax/get_parent_data.php
Normal file
23
_ajax/get_parent_data.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
ini_set('include_path', '../_class/');
|
||||
include('class_sql.php');
|
||||
if ($_SERVER['HTTP_HOST'] == 'badmintoncoach.hu') $sql = new sql('localhost','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);
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user