Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>Ejemplo de PHP</title>
- </head>
- <body>
- <?php
- function Conectarse()
- {
- if (!($link=mysql_connect("200.185.51.66","allexperts277","kah66yjy")))
- {
- echo "Error conectando a la base de datos.";
- exit();
- }
- if (!mysql_select_db("allexperts277",$link))
- {
- echo "Error seleccionando la base de datos.";
- exit();
- }
- return $link;
- }
- $link=Conectarse();
- echo "Conexión con la base de datos conseguida.<br>";
- mysql_close($link); //cierra la conexion
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement