Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $servername = "localhost";
- $username = "username";
- $password = "root";
- $database = "your database name";
- $error = "could not connect";
- $con = mysqli_connect($servername, $username, $password, $database);
- if(!$con) {
- die($error(' .mysqli_conect_errno(). ') '
- .mysqli_connect_error());
- }
- echo 'Success... ' . mysqli_get_host_info($con) . "\n";
- mysqli_close($con);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement