Advertisement
Guest User

conexion

a guest
Jul 27th, 2016
92
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. <?php
  3.  
  4.  
  5. //variables de conexion
  6. $server = "localhost";
  7. $user= "root";
  8. $password="";
  9. $db = "registro";
  10.  
  11. $conex = mysql_connect("$server", "$user", "$password", "$db");
  12. //$conex = mysql_connect ('localhost', 'root', "", "registro");
  13.  
  14.  
  15.  
  16.  
  17.  
  18. //verificar la conexion
  19. if(!$conex) {echo "error";} else {echo nl2br ("estado".':'."conexion exitosa"."\n");}
  20. ?>
Advertisement
RAW Paste Data Copied
Advertisement