-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
59 lines (55 loc) · 2.45 KB
/
index.php
File metadata and controls
59 lines (55 loc) · 2.45 KB
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
53
54
55
56
57
58
59
<!doctype html>
<html lang='en'>
<head>
<title>Password Generator</title>
<meta charset='utf-8'>
<!--load Stylesheet -->
<link rel='stylesheet' href='styles.css' type='text/css'>
<!--link PHP Logic -->
<?php require('generator.php');?>
</head>
<body>
<!--Displays Generated Passwords -->
<h1>xkcd Password Generator</h1>
<!--Display 5 Randomly Generated Passwords -->
<div>
<fieldset>
<legend>Choose Your Password</legend>
<h2><?php echo $password_array[0]?></h2>
<h2><?php echo $password_array[1]?></h2>
<h2><?php echo $password_array[2]?></h2>
<h2><?php echo $password_array[3]?></h2>
<h2><?php echo $password_array[4]?></h2>
</fieldset>
</div>
<br>
<!--Custom Password Settings -->
<form method="get" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>">
<div>
<fieldset>
<legend>Custom Settings</legend>
<!--Number of Words | Text Box-->
<label for="words"><span># of Words    </span></label>
<input type="text" name="words" id="words" value="<?php echo htmlspecialchars($num_words);?>" size=1 placeholder="4" autofocus>
<span class="error"><?php echo $wordsErr;?></span>
<br/>
<!--Separator | Text Box-->
<label for="link"><span>Separator    </span></label>
<input type="text" name="link" id="link" value="<?php echo htmlspecialchars($link);?>" size=3 placeholder="-">
<br/>
<!--Add a Number | Checkbox-->
<label for="number"> Add a Number</label>
<input type="checkbox" name="number" id="number" value="yes" <?php if ($number == 'yes') echo "checked"; ?>>
<br/>
<!--Add a Symbol | Checkbox-->
<label for="symbol"> Add a Symbol  </label>
<input type="checkbox" name="symbol" id="symbol" value="yes" <?php if ($symbol == 'yes') echo "checked"; ?>>
<br/>
<!--Capitalize | Check Box-->
</fieldset>
</div>
<br>
<input type="submit" name="submit" value="Generate New Password" />
</form>
</body>
</html>