Advertisement
Guest User

Untitled

a guest
Jun 9th, 2016
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. <?php
  2.  
  3. $servername = "localhost";
  4. $username = "curso";
  5. $password = "1234";
  6.  
  7. // Create connection
  8. $conn = mysqli_connect($servername, $username, $password);
  9.  
  10. // Check connection
  11. if (!$conn) {
  12. die("Connection failed: " . mysqli_connect_error());
  13. }
  14. echo "Conexion Exitosa";
  15.  
  16. $bd_seleccionada = mysql_select_db($conn,"basededatos"); // Linea 19 del error
  17. if (!$bd_seleccionada) {
  18. die("Conecion fallida: " . mysqli_error());
  19. }
  20. echo "Conexion Exitosa";
  21. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement