-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbusi.php
More file actions
83 lines (53 loc) · 1.85 KB
/
busi.php
File metadata and controls
83 lines (53 loc) · 1.85 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<?php
$hostname='localhost';
$username='root';
$password='';
$dbname='jatra';
$con=mysqli_connect($hostname,$username,$password,$dbname);
if($con)
{
echo"";
}
else
{
echo"conn false";
}
if(isset($_POST['Number_plat']) && isset($_POST['Seat']) && isset($_POST['Price'])){
$Number_plat=$_POST['Number_plat'];
$Seat=$_POST['Seat'];
$Price=$_POST['Price'];
$insert="INSERT INTO bus(Number_plat,Seat,Price)VALUES('$Number_plat','$Seat','$Price')";
if(mysqli_query($con,$insert))
{
echo"true";
}
else
{
echo"false";
}
}
?>
<!DOCTYPE html>
<html>
<style>
*{margin: 0; padding: 0;}
body{background: #ecf1f4; font-family: sans-serif;}
.form-wrap{ width: 320px; background: #3e3d3d; padding: 40px 20px; box-sizing: border-box; position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);}
h1{text-align: center; color: #fff; font-weight: normal; margin-bottom: 20px;}
input{width: 100%; background: none; border: 1px solid #fff; border-radius: 3px; padding: 6px 15px; box-sizing: border-box; margin-bottom: 20px; font-size: 16px; color: #fff;}
input[type="button"]{ background: #bac675; border: 0; cursor: pointer; color: #3e3d3d;}
input[type="button"]:hover{ background: #a4b15c; transition: .6s;}
::placeholder{color: #fff;}
</style>
<body>
<div class="form-wrap">
<form action="" method="POST">
<h1>bus</h1>
<input type="text" placeholder=Number_plat name="Number_plat">
<input type="text" placeholder=Seat name="Seat">
<input type="number_format" placeholder=price name="Price">
<input type="submit" placeholder=submit value="submit">
</form>
</div>
</body>
</html>