-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprocess_client.php
More file actions
33 lines (20 loc) · 807 Bytes
/
process_client.php
File metadata and controls
33 lines (20 loc) · 807 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
<?php
$servername = "server2";
$username = "techcraf_admin";
$password = "mQ0kh06x8R";
$dbname = "techcraf_tech_craft";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
$client_name=$_POST['client_name'];
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "INSERT INTO clients(clients_name) VALUES('$client_name')";
if (mysqli_query($conn, $sql)) {
header("Location: admin_page.php?client=success");
} else {
echo "Error: " . $sql . "" . mysqli_error($conn);
}
$conn->close();
?>