-
Notifications
You must be signed in to change notification settings - Fork 1
/
new.php
43 lines (31 loc) · 780 Bytes
/
new.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
<?php
if ( isset( $_POST[ "userr" ] ) )
$userr= strip_tags( trim($_POST["userr"]));
if ( isset( $_POST[ "passw" ] ) )
$passw= strip_tags( trim($_POST["passw"]));
if ( isset( $_POST[ "pass1" ] ) )
$pass1= strip_tags( trim($_POST["pass1"]));
if(!empty($userr) && !empty($passw)){
$host="localhost";
$dbname="id7285592_kugesh";
$use="id7285592_root";
$pas="11111";
$conn=new mysqli($host,$use,$pas,$dbname);
if(mysqli_connect_error())
{
die('connect error ('.mysqli_connect_error().')');
}
else{
if($passw==$pass1){
$stmt="Insert into reg(user,pass) values('$userr','$passw')";
$conn->query($stmt);
include ('ins_succ.html');
}
else{
include('ins_unsucc.html');
}
}
$conn->close();
}
?>
?>