first commit
This commit is contained in:
16
_include/ajax/update_presence.php
Normal file
16
_include/ajax/update_presence.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
//ini_set('include_path', '/opt/lampp/htdocs/badminton_coach/_class');
|
||||
//include('class_sql.php');
|
||||
echo "juhuuu";
|
||||
foreach ($_POST as $key => $value) {
|
||||
trigger_error($key, E_USER_NOTICE);
|
||||
}
|
||||
if ($_POST['checked'] == true) {
|
||||
//$sql = new sql('localhost','root','','badminton_coach');
|
||||
$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']);
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user