18 lines
627 B
PHP
18 lines
627 B
PHP
<?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');
|
|
|
|
|
|
//lekérjük a labda típusokat
|
|
$shuttle_assoc_array = $sql->assoc_array("SELECT * FROM camp_shuttle JOIN camp_shuttle_type on cst_id = cs_shuttle_id WHERE cs_camp_id = " . $_POST['camp_id']);
|
|
|
|
$shuttle_array = array();
|
|
foreach ($shuttle_assoc_array as $shuttle) {
|
|
$shuttle_array[$shuttle['cst_id']] = $shuttle['cst_name'];
|
|
}
|
|
|
|
echo json_encode($shuttle_assoc_array);
|
|
?>
|