Skip to content

Commit 24bde90

Browse files
committed
Using the GET superglobal
1 parent f13af62 commit 24bde90

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

index.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616

1717
echo '<h1>Welcome to PHP Santa</h1>';
1818
echo sprintf('<a href="/letters">Read the letters</a>');
19+
if (isset($_GET['name'])) {
20+
echo sprintf('<p>Oh, and hello %s!</p>', $_GET['name']);
21+
}
1922

2023
} elseif ($uri == '/letters') {
2124

0 commit comments

Comments
 (0)