Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $tf_host = 'localhost' ;
- $tf_dbname = 'tinyforum' ;
- $tf_username = 'root';
- $tf_password = '' ;
- $tf_handle = mysqli_connect($tf_host , $tf_username , $tf_password);
- if (!$tf_handle){
- die('connection problem ..');
- }
- $tf_db_result = mysqli_select_db($tf_dbname);
- if(!$tf_db_result)
- {
- mysqli_close($tf_handle);
- die('selection problem');
- }
- else{
- die("success");
- }
- mysqli_query($tf_handle, "SET NAMES 'utf8'") ;
- function tinyf_db_close() {
- global $tf_handle;
- mysqli_close($tf_handle);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement