Advertisement
Guest User

conexion

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