-
Notifications
You must be signed in to change notification settings - Fork 0
/
createp.php
56 lines (51 loc) · 1.52 KB
/
createp.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
53
54
55
56
<div class="row">
<div class="col-md-4">
<form method="post" action="" id="login_form1">
<div class="form-group">
<label class="control-label">Project Name</label>
<input type="text" name="project_name" class="form-control input-sm" required>
</div>
<div class="form-group">
<label class="control-label">Project Case Study</label>
<input type="text" name="project_case" class="form-control input-sm" required>
</div>
<div class="form-group">
<label class="control-label">Project Level</label>
<select name="project_level" class="form-control input-sm " required>
<option>ND</option>
<option>HND</option>
</select>
</div>
<button type="submit" class="btn btn-sm btn-default">Submit</button>
</form>
</div>
<div class="col-md-8">
<?php include 'all_project.php'; ?>
</div>
</div>
<script>
$(document).ready(function(){
$("#login_form1").submit(function(e){
e.preventDefault();
var formData = $(this).serialize();
$.ajax({
type: "POST",
url: "addproject.php",
data: formData,
success: function(html){
if(html=='true')
{
$.jGrowl("Adding Project Details Please Wait......", { sticky: true });
$.jGrowl("Successfully added", { header: 'Success !!' });
var delay = 5000;
setTimeout(function(){ window.location = 'create-project.php' }, delay);
}else
{
$.jGrowl("Error creating project", { header: 'Project creation failed' });
}
}
});
return false;
});
});
</script>