Guest User

Untitled

a guest
Aug 29th, 2018
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. <?php
  2. /*define('HOST','127.0.0.1');
  3. define('USUARIO','root');
  4. define('SENHA','1234');
  5. define('DB','login');
  6.  
  7. $conexao = mysqli_connect(HOST,USUARIO,SENHA,DB) or die ('Não foi possível conectar');
  8. */
  9.  
  10. $username = 'root';
  11. $password = '1234';
  12.  
  13. try{
  14.  
  15. $dbh = new PDO("mysql:host=localhost1;dbname=login",$username,$password);
  16. }catch(PDOException $er){
  17. echo $er -> getMessage();
  18. //var_dump($er);
  19. }
  20.  
  21.  
  22. ?>
Add Comment
Please, Sign In to add comment