-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathcekuser.php
More file actions
25 lines (23 loc) · 731 Bytes
/
Copy pathcekuser.php
File metadata and controls
25 lines (23 loc) · 731 Bytes
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
<?php
header("Cache-Control: no-cache, must-revalidates");
header("Expires: Mon, 26 Jul 1997 00:00:00 GMT");
require_once ("config/koneksi.php");
$x = $_GET["x"]; // Ambil variabel URL
$uid = $_GET["uid"];
$sql = "SELECT * FROM user WHERE uUname='$x' AND uId!='$uid'";
$hasil = mysql_query($sql);
if (!$hasil){
print("query tak dapat diproses");
}else{
$baris = mysql_fetch_row($hasil);
$data_ada = TRUE;
if (empty($baris)){
$data_ada = FALSE;
}
if ($data_ada){
echo "<span class='label label-large label-warning'>Username sudah terdaftar, Gunakan Username lain..!!</span>";
}else{
echo "<span class='label label-large label-success'>OK</span>";
}
}
?>