-
Notifications
You must be signed in to change notification settings - Fork 0
/
forms.php
52 lines (42 loc) · 1.67 KB
/
forms.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
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php
function homeForm ($output){
if (empty($output))
{
$output = '';
}
return '<form id="signup" method="post" action="' . $_SERVER["PHP_SELF"] . '">
<h1>Micro Blog</h1>
<input type="submit" name="login" value="Login" id="submit" />
<input type="submit" name="register" value="Register" id="submit" />
<div class="posts" name="homePost">
' . $output . '
</div>
</form>';
}
$login =
'<form id="signup" method="post" action="' . $_SERVER["PHP_SELF"] . '">
<h1>User login</h1>
<h2>User ID:</h2>
<input type="text" name="username" value="' . $username . '">
<h2>Password:</h2>
<input type="password" name="password">
<input type="submit" id="submit" name="login2" value="Login" />
</form>';
$signup =
'<form id="signup" method="post" action="' . $_SERVER["PHP_SELF"] . '">
<h1>User Sign Up - Register To Post</h1>
<h2>User ID:</h2>
<input type="text" name="username" value="' . $username . '">
<h2>Password:</h2>
<input type="password" name="password">
<input type="submit" id="submit" name="register2" value="Register" />
<input type="submit" id="submit" name="cancel" value="Cancel" />
</form>';
$post =
'<form id="signup" method="post" action="' . $_SERVER["PHP_SELF"] . '">
<h1>Micro Blog - Make a Post!</h1>
<input type="submit" name="signout" value="Signout" id="submit" />
<textarea name="posttext" rows="8" cols="54"></textarea>
<input type="submit" name="post" value="Post" id="submit" />
</form>';
?>