4
Answers

error in databse connection

Hema Sundar

Hema Sundar

9y
433
1
<?php
$servername = "localhost";
$username = "madhuri_abc";
$password = "happy123";
$dbname = "madhuri_789";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
?>
this is my code it was workin in local host but not working in real time . Guys pls hepl me im begineer in php 
Answers (4)
0
Sam Hobbs

Sam Hobbs

NA 28.7k 1.3m 15y
0
Amit Choudhary

Amit Choudhary

NA 27.7k 3m 15y
hi friend,

Please give more details about it how you want to read. if you want to read HTML file you can read it as XML file  programmatically and if you want to read it using like javascript then you can identify the table by giving it an id. and read the rows.

Please mark as answer if it helps.