-
Notifications
You must be signed in to change notification settings - Fork 0
/
inscreption.php
62 lines (54 loc) · 1.56 KB
/
inscreption.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
57
58
59
60
61
62
<!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>
<link rel="stylesheet" href="css_file/style.css">
</head>
<body>
<h1>
inscription
</h1>
<div class="log_in">
<form action="" method="post">
id
<input type="text" name="user_id">
<br>
name
<input type="text" name="user_name">
<br>
email
<input type="text" name="user_email">
<br> <br>
<div>
<button>send</button>
</div>
</form>
</div>
<?php
if (isset($_POST["user_id"])) {
$con = new mysqli("127.0.01", "root", "@mine1997Amine", "tp");
$user_id = $_POST["user_id"];
$user_name = $_POST["user_name"];
$user_email = $_POST["user_email"];
$sql = "insert into tab(id,name,email)values($user_id,'$user_name','$user_email')";
$resault = $con->query($sql);
if ($resault)
/* if($con->errno!=1062)
echo "registred succsfully";
else
echo "user id already exist";
}*/
echo "registred";
else
echo "error: bad user id";
/*
if ($resault) echo "succsuflly registred";
else echo "succsuflly registred";
*/
}
?>
</body>
</html>