· 9 years ago · Aug 17, 2017, 11:12 AM
1$servername = "sql.server.it";
2$username = "adfds72117";
3$password = "websdfc01753";
4$dbname = "adfds72117";
5// Create connection
6$conn = mysqli_connect($servername, $username, $password, $dbname);
7// Check connection
8if (!$conn) {
9die("Connection failed: " . mysqli_connect_error());
10}
11
12// sql to create table
13$sql = "CREATE TABLE IF NOT EXISTS data (
14id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
15link text NOT NULL,
16title text NOT NULL,
17description text NOT NULL,
18internal_link text NOT NULL,
19 eg_date TIMESTAMP
20)ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=latin1";
21$sql = "INSERT INTO data (title)
22VALUES
23('$title')";
24
25mysqli_close($conn);