-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinsertlawyer.php
More file actions
43 lines (40 loc) · 978 Bytes
/
Copy pathinsertlawyer.php
File metadata and controls
43 lines (40 loc) · 978 Bytes
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
<!DOCTYPE html>
<html>
<link rel= "stylesheet" href= "style.css">
<div align = center>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>insert a lawyer</title>
<br>
<h3>Enter the information of the lawyer that you want to insert
</head>
<body>
</body>
</html>
<?php
include "config.php";
?>
<br>
<br>
<form action="insertlawyer.php" method="POST">
<input type="text" name="lid" placeholder="The id">
<br>
<input type="text" name="cost" placeholder="The cost (per case)">
<br>
<input type="text" name="name" placeholder="The name">
<br>
<button>INSERT</button>
</form>
</div>
<?php
if(isset($_POST['lid']))
{
$lid = $_POST['lid'];
$cost = $_POST['cost'];
$name = $_POST['name'];
$sql_statement = "INSERT INTO lawyers(lid, cost, name) VALUES ('$lid', '$cost', '$name')";
$result = mysqli_query($db, $sql_statement);
header ("Location: indexlawyers.php");
}
?>