-
Notifications
You must be signed in to change notification settings - Fork 0
/
form.php
39 lines (39 loc) · 838 Bytes
/
form.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?
session_register('name');
if( ! $name ) $name = 'Anonymous';
if( $my_name_is ) $name = $my_name_is;
?><!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Blue page</title>
</head>
<body bgcolor="#efe">
<h1>Form page</h1>
<? include('counter.php') ?>
<form>
<p>
<b>Hi, <?= htmlspecialchars($name) ?>!</b>
👈
<i>I'll remember the name you give me when you come back!</i>
</p>
<p>
That's not my name! My name is:
<input name="my_name_is" placeholder="your name here">
<input type="submit" value="Hi!">
</p>
</form>
<p>
Now what?
</p>
<ul>
<li>
<a href="/">Go home</a>
</li>
<li>
<a href="/red.php">Switch to the Red Page</a>
</li>
</ul>
</body>
</html>