Files
code-cegled/_ajax/update_presence.php
Ricsi 303f26587f Responsive design;
New menus (members);
Improved interface for parent editing;
2016-12-03 11:10:28 +01:00

18 lines
666 B
PHP
Executable File

<?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');
/*
foreach ($_POST as $key => $value) {
trigger_error($key . " : " . $value, E_USER_NOTICE);
}
*/
if ($_POST['checked'] == "true") {
$sql->insert_into('presence', array('pr_user_kid_uk_id' => $_POST['user_id'], 'pr_training_tr_id' => $_POST['tr_id']));
}
else {
$sql->execute_query('delete from presence where pr_user_kid_uk_id = ' . $_POST['user_id'] . ' AND pr_training_tr_id = ' . $_POST['tr_id']);
}
?>