Advertisement
Guest User

COMUNICA COM BD

a guest
Nov 13th, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. <?php
  2. //FUNCAO DE CONEXAO
  3. function conecta(){
  4. try{
  5. $conn = new PDO('mysql:host=localhost;dbname=restaurante', 'bruno', 'bruno');
  6. return $conn;
  7. }catch(PDOException $erro){
  8. echo $erro->getMessage();
  9. }
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement