repo.or.cz
/
todo-rest-api_edi2-2023.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Merge branch 'dummy-session'
[todo-rest-api_edi2-2023.git]
/
get_items_id.php
blob
efa7c8b353c915363140a5cc8d477850186c1db5
1
<
?php
2
3
function
handle_request
(
$id
,
$input
) {
4
if
(
empty
(
$_SESSION
[
'items'
][
$id
])) {
5
header
(
'HTTP/1.1 404 Not Found'
);
6
return
;
7
}
8
9
echo
json_encode
(
$_SESSION
[
'items'
][
$id
]);
10
}