Skip to content

Commit dbf7d3f

Browse files
author
Kshtiij
committed
fix user add issue
1 parent 1cf4416 commit dbf7d3f

File tree

4 files changed

+13
-6
lines changed

4 files changed

+13
-6
lines changed

orders.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@
8787
<tr>
8888
<th style="width:40%;">Product</th>
8989
<th style="width:20%;">Rate</th>
90-
<th style="width:20%;">Available Quantity</th>
90+
<th style="width:10%;">Available Quantity</th>
9191
<th style="width:15%;">Quantity</th>
92-
<th style="width:15%;">Total</th>
92+
<th style="width:25%;">Total</th>
9393
<th style="width:10%;"></th>
9494
</tr>
9595
</thead>

php_action/createUser.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88

99
$userName = $_POST['userName'];
1010
$upassword = md5($_POST['upassword']);
11+
$uemail = $_POST['uemail'];
1112

1213

13-
$sql = "INSERT INTO users (username, password)
14-
VALUES ('$userName', '$upassword')";
15-
14+
$sql = "INSERT INTO users (username, password,email)
15+
VALUES ('$userName', '$upassword' , '$uemail')";
1616
if($connect->query($sql) === TRUE) {
1717
$valid['success'] = true;
1818
$valid['messages'] = "Successfully Added";

php_action/fetchProduct.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
brands.brand_name, categories.categories_name FROM product
1010
INNER JOIN brands ON product.brand_id = brands.brand_id
1111
INNER JOIN categories ON product.categories_id = categories.categories_id
12-
WHERE product.status = 1";
12+
WHERE product.status = 1 AND product.quantity>0";
1313

1414
$result = $connect->query($sql);
1515

user.php

+7
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,13 @@
7070
</div>
7171
</div> <!-- /form-group-->
7272

73+
<div class="form-group">
74+
<label for="uemail" class="col-sm-3 control-label">Email: </label>
75+
76+
<div class="col-sm-8">
77+
<input type="email" class="form-control" id="uemail" placeholder="Email" name="uemail" autocomplete="off">
78+
</div>
79+
</div> <!-- /form-group-->
7380

7481
</div> <!-- /modal-body -->
7582

0 commit comments

Comments
 (0)