Skip to content

Commit 6fdda79

Browse files
authored
Update add-users.php
1 parent a4dbc87 commit 6fdda79

File tree

1 file changed

+11
-20
lines changed

1 file changed

+11
-20
lines changed

add-users.php

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,17 @@
1313
}else{
1414

1515
$userCount = $db->getQueryCount('users','id');
16-
if($userCount[0]['total']<20){
17-
$data = array(
18-
'username'=>$username,
19-
'useremail'=>$useremail,
20-
'userphone'=>$userphone,
21-
);
22-
$insert = $db->insert('users',$data);
23-
if($insert){
24-
header('location:browse-users.php?msg=ras');
25-
exit;
26-
}else{
27-
header('location:browse-users.php?msg=rna');
28-
exit;
29-
}
16+
$data = array(
17+
'username'=>$username,
18+
'useremail'=>$useremail,
19+
'userphone'=>$userphone,
20+
);
21+
$insert = $db->insert('users',$data);
22+
if($insert){
23+
header('location:browse-users.php?msg=ras');
24+
exit;
3025
}else{
31-
header('location:'.$_SERVER['PHP_SELF'].'?msg=dsd');
26+
header('location:browse-users.php?msg=rna');
3227
exit;
3328
}
3429
}
@@ -211,10 +206,6 @@ function gtag(){dataLayer.push(arguments);}
211206

212207
echo '<div class="alert alert-danger"><i class="fa fa-exclamation-triangle"></i> Record not added <strong>Please try again!</strong></div>';
213208

214-
}elseif(isset($_REQUEST['msg']) and $_REQUEST['msg']=="dsd"){
215-
216-
echo '<div class="alert alert-danger"><i class="fa fa-exclamation-triangle"></i> Please delete a user and then try again <strong>We set limit for security reasons!</strong></div>';
217-
218209
}
219210

220211
?>
@@ -326,4 +317,4 @@ function gtag(){dataLayer.push(arguments);}
326317

327318
</body>
328319

329-
</html>
320+
</html>

0 commit comments

Comments
 (0)