-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmanage_borrower1.php
88 lines (85 loc) · 2.23 KB
/
manage_borrower1.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<?php include 'db_connect.php' ?>
<?php
if(isset($_GET['id'])){
$qry = $conn->query("SELECT * FROM roles where roleID=".$_GET['id']);
foreach($qry->fetch_array() as $k => $val){
$$k = $val;
}
}
?>
<div class="container-fluid">
<div class="col-lg-12">
<form action="signup.php" method="POST">
<input type="hidden" name="id" value="<?php echo isset($_GET['id']) ? $_GET['id'] : '' ?>">
<div class="row">
<div class="col-md-4">
<div class="form-group">
<label for="" class="control-label">Last Name</label>
<input type="text" name="lastname">
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label for="">First Name</label>
<input type="text" name="firstname">
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label for="">Username</label>
<input type="text" name="username">
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label for="">Password</label>
<input type="text" name="password">
</div>
</div>
<div class="row form-group">
<div class="col-md-6">
<label for="">Address</label>
<textarea type="text" name="address"></textarea>
</div>
<div class="col-md-5">
<div class="">
<label for="">Contact #</label>
<input type="text" name="contact_no">
</div>
</div>
</div>
<div class="row form-group">
<div class="col-md-6">
<label for="">Email</label>
<input type="text" name="email">
</div>
<div class="col-md-5">
<div class="">
<label for="">Tax ID</label>
<input type="text" name="tax_id">
</div>
</div>
</div>
<button type="submit" name="submit">Save</button>
</form>
</div>
</div>
<script>
$('#manage-borrower').submit(function(e){
e.preventDefault()
start_load()
$.ajax({
url:'ajax.php?action=save_borrower',
method:'POST',
data:$(this).serialize(),
success:function(resp){
if(resp == 1){
alert_toast("Borrower data successfully saved.","success");
setTimeout(function(e){
location.reload()
},1500)
}
}
})
})
</script>