-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcheckattributes.php
56 lines (34 loc) · 1 KB
/
checkattributes.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
<?php
include "connection.php";
if(isset($_POST['USER_NAME']))
{
$uname=$_POST['USER_NAME'];
$sql="select * from user where username = '$uname';";
$result=mysqli_query($con,$sql);
if(mysqli_num_rows($result)>0)
{
echo '<span class =" alert-danger h6 py-1 px-4 rounded-sm ">Username Already Exists</span>';
echo '<script>windows.alert("hello");</script>';
}
}
elseif(isset($_POST['EMAIL']))
{
$EMAIL=$_POST['EMAIL'];
$sql1="select * from user where email = '$EMAIL';";
$result1=mysqli_query($con,$sql1);
if(mysqli_num_rows($result1)>0)
{
echo '<span class =" alert-danger h6 py-1 px-4 rounded-sm ">Email Already Exists</span>';
}
}
if(isset($_POST['REGNO']))
{
$REG=$_POST['REGNO'];
$sql2="select * from user where reg_no = '$REG';";
$result2=mysqli_query($con,$sql2);
if(mysqli_num_rows($result2)>0)
{
echo '<span class =" alert-danger h6 py-1 px-4 rounded-sm text-center">Reg No. Already Exists</span>';
}
}
?>