-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathuser.php
More file actions
50 lines (47 loc) · 1.05 KB
/
Copy pathuser.php
File metadata and controls
50 lines (47 loc) · 1.05 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<form action="" method="POST">
<input type="text" name="username">
<input type="text" name="password">
<input type="email" name="email">
<input type="submit" name="submit">
</form>
<?php
include("api/db.php");
include("api/credential.php");
$data=new DataBase($hostname,$dbname,$username,$password);
echo $username=$_POST['username'];
echo $password=$_POST['password'];
if(!empty($username)){
$username=strencode($username);
}
function strtoarry($msg)
{
$msg=strrev($msg);
$msg= str_split($msg);
return $msg;
}
function strencode($msg)
{
$msg= strtoarry($msg);
$str='';
for ($i=0; $i < count($msg) ; $i++) {
$str.=ord( $msg[$i]);
}
$str;
$str=base64_encode($str);
$str=bin2hex($str);
$str=convert_uuencode($str);
$length=strlen($str);
return $str;
}
?>
</body>
</html>