forked from Hardik-Agrawal/InternManagerIITP
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaddproject.php
More file actions
33 lines (30 loc) · 1.09 KB
/
addproject.php
File metadata and controls
33 lines (30 loc) · 1.09 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
<?php include('includes/header.php') ?>
<?php include('includes/nav.php') ?>
<?php
if (!logged_in()) {
set_message("<p class='bg-danger'>Please login again to view that page<p>");
redirect("login.php");
}
$row = getUserDetails($_SESSION['email']);
$projects = getProfProjects($_SESSION['email']);
?>
<!-- <a href="./prof_profile.php" class="btn btn-warning btn-medium">Back to Profile</a> -->
<div class="container">
<div>
<?php
if ($_SERVER['REQUEST_METHOD'] == "POST") {
add_project($_SESSION['email'], $_POST['title'], $_POST['des']);
}
?>
</div>
<form action="./addproject.php" id="projectForm" method="POST">
<div class="form-group">
<label for="title">Title</label>
<input type="text" name="title" class="form-control" id="title" style="width: 60%">
</div>
<textarea name="des" id="des" form="projectForm" style="width: 60%; height: 200px;"></textarea>
<br>
<button type="submit" class="btn btn-default">Submit</button>
</form>
</div>
<?php include('includes/footer.php') ?>