There was an error while loading. Please reload this page.
1 parent 9f698f9 commit 2634241Copy full SHA for 2634241
README.md
@@ -1,22 +1,3 @@
1
-<!-- conection for database using mysqli for local host -->
2
-
3
-<?php
4
5
-$con = mysqli_connect("localhost","root","password","database_name");
6
7
-?>
8
9
-<!-- connection by PDO -->
10
11
12
- $user='root';
13
- $pass='';
14
- $dbname='database_name';
15
16
- $conn = new PDO('mysql:host=localhost;dbname= database_name', $user, $pass);
17
-if (!$conn) {
18
-die("Connection failed: " . $conn->connect_error);
19
-}
20
- $conn->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC);
21
22
+SQL Database Connectivity using Mysqli and PDO method in PHP
+
+ PDO method is more secure then mysqli
0 commit comments