-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadd_client.php
More file actions
141 lines (113 loc) · 4.29 KB
/
Copy pathadd_client.php
File metadata and controls
141 lines (113 loc) · 4.29 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
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<?php
include "global_module.php";
if($_POST)
{
$client_id = key_engine('client');
$client_name = $_POST['client_name'];
$client_email = $_POST['client_email'];
$client_address = $_POST['client_address'];
$client_gstin = $_POST['client_gstin'];
$client_contact = $_POST['client_contact'];
$query = "INSERT INTO `client` (`client_id`, `client_name`, `client_email`, `client_address`, `client_gstin`, `client_contact`) VALUES ('$client_id', '$client_name', '$client_email', '$client_address', '$client_gstin', '$client_contact') ";
if(insert_data($query))
{
$alert_success = "Client ". $client_name ." Added";
}
else
{
$alert_error = $query;
}
}
?>
<!doctype html>
<html lang="en">
<title>Neno Coil</title>
<head>
<!--Required Meta Tags-->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Main CSS Stylesheet -->
<link rel="stylesheet" type="text/css" href="content/source/css/style.css">
<!-- Bootstrap Css Stylesheet Integration -->
<link rel="stylesheet" type="text/css" href="content/source/css/bootstrap.css">
<link rel="stylesheet" type="text/css" href="content/source/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="content/source/css/bootstrap-grid.css">
<link rel="stylesheet" type="text/css" href="content/source/css/bootstrap-grid.min.css">
<link rel="stylesheet" type="text/css" href="content/source/css/bootstrap-reboot.css">
<link rel="stylesheet" type="text/css" href="content/source/css/bootstrap-reboot.min.css">
<style>
</style>
</head>
<body>
<nav class="navbar neno-orange" >
<a class="navbar-brand" href="index.php">
<img src="content/media/images/logo.jpg" width="10%" height="8%" alt="NenoCoil Logo">
</a>
</nav>
<div class="jumbotron text-center" >
<h1>Add Client</h1>
</div>
<div class="container neno_form row">
<div class="col-md-4"></div>
<form class="col-md-6 " method=POST name="add_client_form">
<?php
if(isset($alert_success))
{
echo "
<div class='alert alert-success alert-dismissible fade show' role='alert'>
<strong>Success !</strong> ".$alert_success."
<button type='button' class='close' data-dismiss='alert' aria-label='Close'>
<span aria-hidden='true'>×</span>
</button>
</div>";
}
elseif(isset($alert_error))
{
echo "
<div class='alert alert-danger alert-dismissible fade show' role='alert'>
<strong>Error !</strong> Check You Query <br>".$alert_error."
<button type='button' class='close' data-dismiss='alert' aria-label='Close'>
<span aria-hidden='true'>×</span>
</button>
</div>";
}
?>
<div class="form-group ">
<label for="client_name" >Client Id</label>
<input type="text" class="form-control" name="client_id" value="<?php echo key_engine('client'); ?>" disabled>
</div>
<div class="form-group ">
<label for="client_name" >Client Name</label>
<input type="text" class="form-control" name="client_name" placeholder="Enter Name Here">
</div>
<div class="form-group ">
<label for="client_name" >Client Email</label>
<input type="text" class="form-control" name="client_email" placeholder="Enter Email Here">
</div>
<div class="form-group ">
<label for="client_name" >Client GSTIN</label>
<input type="text" class="form-control" name="client_gstin" placeholder="Enter GSTING Here">
</div>
<div class="form-group ">
<label for="client_name" >Client Address</label>
<input type="text" class="form-control" name="client_address" placeholder="Enter Address Here">
</div>
<div class="form-group ">
<label for="client_name" >Client Contact</label>
<input type="text" class="form-control" name="client_contact" placeholder="Enter Contact Here">
</div>
<div class="form-group ">
<button type="submit">Add</button>
</div>
</form>
<div class="col-md-4"></div>
</div>
<!-- Main Js Integration -->
<script type="text/javascript" src="content/source/js/style.js"></script>
<!-- Bootstrap Js Integration -->
<script type="text/javascript" src="content/source/js/bootstrap.bundle.js"></script>
<script type="text/javascript" src="content/source/js/bootstrap.bundle.min.js"></script>
<script type="text/javascript" src="content/source/js/bootstrap.js"></script>
<script type="text/javascript" src="content/source/js/bootstrap.min.js"></script>
</body>
</html>