-
Notifications
You must be signed in to change notification settings - Fork 5
/
cr82.php
52 lines (47 loc) · 1.34 KB
/
cr82.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
<?php
$servername = "localhost";
$username = "flypadic_001";
$password = "An0therrichard3303";
$dbname = "flypadic_001";
$date = date('m-d-Y');
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
echo "Connected successfully";
// sql to create table
$sql = "CREATE TABLE tracking (
id INT(8) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
shipdate VARCHAR(60) NOT NULL,
shippersname VARCHAR(60) NOT NULL,
shippersaddress VARCHAR(60) NOT NULL,
deliverydate VARCHAR(60) NOT NULL,
receiversname VARCHAR(60) NOT NULL,
receiversaddress VARCHAR(60) NOT NULL,
weight VARCHAR(60) NOT NULL,
address1 VARCHAR(60) NOT NULL,
address2 VARCHAR(60) NOT NULL,
address3 VARCHAR(60) NOT NULL,
address4 VARCHAR(60) NOT NULL,
address5 VARCHAR(60) NOT NULL,
status VARCHAR(60) NOT NULL,
trackingid VARCHAR(60) NOT NULL,
a VARCHAR(60) NOT NULL,
reg_dateauto TIMESTAMP
)";
if ($conn->query($sql) === TRUE) {
echo "Table register created successfully";
} else {
echo "Error creating table: " . $conn->error;
}
$conn->close();
/*try {
$dbh = new PDO('mysql:host=localhost;dbname=ddxlogis_001', 'ddxlogis_001', 'An0therrichard3303');
echo 'connected';
} catch (PDOException $e) {
print "Error!: " . $e->getMessage() . "<br/>";
die();
}*/
?>