-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlog.php
More file actions
48 lines (46 loc) · 1.02 KB
/
Copy pathlog.php
File metadata and controls
48 lines (46 loc) · 1.02 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
<?php
include "db.php";
// define variables and set to empty values
$email=$username=$password="";
if (isset($_POST['submit'])) {
$email = test_input($_POST["email"]);
$username = test_input($_POST["username"]);
$password = test_input($_POST["password"]);
$res=mysqli_query($conn,"INSERT into user values('$email','$username','$password')");
if($res)
{
echo "<script type='text/javascript'>alert('signed up successfully!!!');</script>";
include "userlog.php";
}
else{
echo "please enter valid credentials";
include "signup.php";
}
}
else
{
echo "";
}
function test_input($data) {
$data = trim($data);
$data = stripslashes($data);
$data = htmlspecialchars($data);
return $data;
}
?>
<html>
<head>
</head>
<body>
<style>
body{
background-image: url("./images/n.jpg");
height: 100%;
/* Center and scale the image nicely */
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
</style>
</body>
</html>