-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
46 lines (45 loc) · 1.7 KB
/
index.php
File metadata and controls
46 lines (45 loc) · 1.7 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
<?php require_once "validate.php" ?>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Contact Us</title>
<link rel="stylesheet" href="bootstrap.min.css">
</head>
<body>
<nav class="navbar navbar-default">
<div class="container">
<div class="navbar-header">
<a href="index.php" class="navbar-brand">My Website</a>
</div>
</div>
</nav>
<div class="container">
<?php if($msg != "") : ?>
<div class="alert <?= $msgClass; ?>"><?= $msg; ?></div>
<?php endif; ?>
<form action="<?= $_SERVER['PHP_SELF']; ?>" method="post">
<div class="form-group">
<label for="name">Name
<input type="text" name="name" value="<?= isset($_POST['name']) ? $name : ''; ?>" class="form-control">
</label>
</div>
<div class="form-group">
<label for="email">Email
<input type="text" name="email" value="<?= isset($_POST['email']) ? $email : ''; ?>" class="form-control">
</label>
</div>
<div class="form-group">
<label for="message">Message
<textarea name="message" class="form-control"><?= isset($_POST['message']) ? $message : ''; ?></textarea>
</label>
</div>
<br>
<button type="submit" name="submit" class="btn btn-primary">Submit</button>
</form>
</div>
</body>
</html>