-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathaddItems.php
More file actions
30 lines (27 loc) · 835 Bytes
/
addItems.php
File metadata and controls
30 lines (27 loc) · 835 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
<?php
// Create connection
$conn = new mysqli('localhost', 'jada1750', '23591750', 'jada1750');
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$em = $_GET["em"];
$day = $_GET["day"];
$it1 = $_GET["it1"];
$it2 = $_GET["it2"];
$it3 = $_GET["it3"];
$it4 = $_GET["it4"];
$it5 = $_GET["it5"];
$it6 = $_GET["it6"];
$it7 = $_GET["it7"];
$it8 = $_GET["it8"];
$it9 = $_GET["it9"];
$it10 = $_GET["it10"];
$sql = "CALL addItems('$em', '$day', '$it1', '$it2', '$it3', '$it4', '$it5', '$it6', '$it7', '$it8', '$it9', '$it10')";
if ($conn->query($sql) === TRUE) {
echo "New record created successfully";
} else {
echo "Error: " . $sql . "<br>" . $conn->error;
}
$conn->close();
?>