-
Notifications
You must be signed in to change notification settings - Fork 0
/
setnoofuser.php
85 lines (61 loc) · 4.77 KB
/
setnoofuser.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
<?php
// session_start();
// $servername = "localhost";
// $username = "root";
// $password = "";
// $dbname="ludo";
include("config.php");
$a= $_POST['no'];
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed:". $conn->connect_error);
}
$sql = "UPDATE `noofuser` SET `nouser` = '$a' WHERE `id` = 1";
$result = $conn->query($sql);
$conn->close();
$nouser=$a;
if($nouser==2){
echo '<input type="text" id="ibox1" style=" width:45%;background-color:black;color:white;border:3px solid white;margin-top:5px;border-radius:20px;height:35px;padding:5px;font-weight:bolder;font-size:large" maxlength="15" id="name" placeholder="enter Red User`s name(max length 15) colour:Red">
<button id="nb1" onclick="id1(1)" style="height:42px;border-radius:20px; width:20%;margin-left:5px;background-color:red;color:white">Save User</button>
<br>
<br>
<input type="text" id="ibox3" style="width:45%;background-color:black;color:white;border:3px solid white;margin-top:5px;border-radius:20px;height:35px;padding:5px;font-weight:bolder;font-size:large" maxlength="15" id="name" placeholder="enter Blue User`s name(max length 15) colour:Blue">
<button id="nb3" onclick="id1(3)" style="height:42px;border-radius:20px; width:20%;margin-left:5px;background-color:blue;color:white">Save User</button>
<br>
';
}
else if($nouser==3){
echo '<input type="text" id="ibox1" style=" width:45%;background-color:black;color:white;border:3px solid white;margin-top:5px;border-radius:20px;height:35px;padding:5px;font-weight:bolder;font-size:large" maxlength="15" id="name" placeholder="enter Red User`s name(max length 15) colour:Red">
<button id="nb1" onclick="id1(1)" style="height:42px;border-radius:20px; width:20%;margin-left:5px;background-color:red;color:white">Save User</button>
<br>
<br>
<input type="text" id="ibox2" style="width:45%;background-color:black;color:white;border:3px solid white;margin-top:5px;border-radius:20px;height:35px;padding:5px;font-weight:bolder;font-size:large" maxlength="15" id="name" placeholder="enter Green User`s name(max length 15) colour:Green">
<button id="nb2" onclick="id1(2)" style="height:42px;border-radius:20px; width:20%;margin-left:5px;background-color:green;color:white">Save User</button>
<br>
<br>
<input type="text" id="ibox3" style="width:45%;background-color:black;color:white;border:3px solid white;margin-top:5px;border-radius:20px;height:35px;padding:5px;font-weight:bolder;font-size:large" maxlength="15" id="name" placeholder="enter Blue User`s name(max length 15) colour:Blue">
<button id="nb3" onclick="id1(3)" style="height:42px;border-radius:20px; width:20%;margin-left:5px;background-color:blue;color:white">Save User</button>
<br>
';
}
else if($nouser==4){
echo '<br>
<input type="text" id="ibox1" style=" width:45%;background-color:black;color:white;border:3px solid white;margin-top:5px;border-radius:20px;height:35px;padding:5px;font-weight:bolder;font-size:large" maxlength="15" id="name" placeholder="enter Red User`s name(max length 15) colour:Red">
<button id="nb1" onclick="id1(1)" style="height:42px;border-radius:20px; width:20%;margin-left:5px;background-color:red;color:white">Save User</button>
<br>
<br>
<input type="text" id="ibox2" style="width:45%;background-color:black;color:white;border:3px solid white;margin-top:5px;border-radius:20px;height:35px;padding:5px;font-weight:bolder;font-size:large" maxlength="15" id="name" placeholder="enter Green User`s name(max length 15) colour:Green">
<button id="nb2" onclick="id1(2)" style="height:42px;border-radius:20px; width:20%;margin-left:5px;background-color:green;color:white">Save User</button>
<br>
<br>
<input type="text" id="ibox3" style="width:45%;background-color:black;color:white;border:3px solid white;margin-top:5px;border-radius:20px;height:35px;padding:5px;font-weight:bolder;font-size:large" maxlength="15" id="name" placeholder="enter Blue User`s name(max length 15) colour:Blue">
<button id="nb3" onclick="id1(3)" style="height:42px;border-radius:20px; width:20%;margin-left:5px;background-color:blue;color:white">Save User</button>
<br>
<br>
<input type="text" id="ibox4" style="width:45%;background-color:black;color:white;border:3px solid white;margin-top:5px;border-radius:20px;height:35px;padding:5px;font-weight:bolder;font-size:large" maxlength="15" id="name" placeholder="enter Yellow User`s name(max length 15) colour:Yellow">
<button id="nb4" onclick="id1(4)" style="height:42px;border-radius:20px; width:20%;margin-left:5px;background-color:yellow;color:black">Save User</button>
<br>
';
}
?>