Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // the database credentials and connection are stored in this file and included in each php page
- // db connection credentials
- $db_user="imageuser";
- $db_pass="password";
- $db_host="localhost";
- $db_name="images";
- $conn= mysqli_connect($db_host, $db_user, $db_pass, $db_name);
- if($conn->connect_errno)
- {
- // if there is a connection error, print the error
- printf("Connect failed: %s\n", $conn->connect_error);
- // handle the error or even die, why continue if there is no db connection.
- die();
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement