-
Notifications
You must be signed in to change notification settings - Fork 0
/
db.php
29 lines (23 loc) · 824 Bytes
/
db.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
<?php
// session_start();
// $conn = mysqli_connect(
// 'localhost',
// 'proyectoweb',
// 'Timi.22%',
// 'nocopydb'
// ) or die(mysqli_erro($mysqli)); _______________________________________________
// $mysqli = new mysqli("localhost", "proyectoweb", "Timi.22%", "nocopydb");
// if ($mysqli->connect_errno) {
// echo "Fallo al conectar a MySQL: (" . $mysqli->connect_errno . ") " . $mysqli->connect_error;
// }
// echo $mysqli->host_info . "\n";
// $mysqli = new mysqli("127.0.0.1", "proyectoweb", "Timi.22%", "nocopydb", 3306);
// if ($mysqli->connect_errno) {
// echo "Fallo al conectar a MySQL: (" . $mysqli->connect_errno . ") " . $mysqli->connect_error;
// }
// echo $mysqli->host_info . "\n";
// if ($conn->connect_error) {
// die("Connection failed: "
// . $conn->connect_error);
// }
?>