-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprojectForm.php
37 lines (34 loc) · 1.17 KB
/
projectForm.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
<!DOCTYPE html>
<html>
<head>
<title> Project View </title>
<link href="styles/form.css" rel="stylesheet" type="text/css">
<link href="styles/helper.css" rel="stylesheet" type="text/css">
<script src="js/validation/project.js"></script>
<?php include 'php/createProject.php';?>
</head>
<body>
<div class="formStyle">
<h1> Project Creation Form </h1>
<form id="projectForm" method="POST" action="" onsubmit="return projectValidation()">
<input type="text" placeholder="Project Name" name="name">
<input type="submit" value="Create Project" name="createProject">
<?php
if (isset($createdProject) && $createdProject) {
echo "Successfully created project \"".$_SESSION['project']."\"!";
echo "<script> window.location.href='index.php'; </script>";
}
?>
<div class="errors">
<?php
if (isset($createdProject) && !$createdProject) {
echo "<ul class='errorList bordered'>
<li class='error'> $error </li>
</ul>";
}
?>
</div>
</form>
</div>
</body>
</html>