Advertisement
sueckreimir

konekcija

Sep 24th, 2019
663
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.80 KB | None | 0 0
  1. #konekcija.php
  2. <!DOCTYPE html>
  3. <!--
  4. To change this license header, choose License Headers in Project Properties.
  5. To change this template file, choose Tools | Templates
  6. and open the template in the editor.
  7. -->
  8. <html>
  9.     <head>
  10.         <meta charset="UTF-8">
  11.         <title></title>
  12.     </head>
  13.     <body>
  14.         <?php
  15.         $host='localhost';
  16.         $user='root';
  17.         $password='';
  18.         $database='fakultet';
  19.         $utf='utf8';
  20.        
  21.         $link= mysqli_connect($host, $user, $password, $database);
  22.         $charset= mysqli_set_charset($link, $utf);
  23.        
  24.         if($link and $charset==TRUE)
  25.         {
  26.             #echo 'Da';
  27.        }
  28.         else
  29.         {
  30.             echo 'Ne';
  31.             die();
  32.         }
  33.        
  34.        
  35.         ?>
  36.     </body>
  37. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement