Problema apara conectar base de datos


Hola en mi localhost de mi pc funciona todo correcto pero al subir mi pagina no conecta con la base de datos
este es mi código de conección:

<?php if (!isset($_SESSION)) {
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_conexion = "localhost";
$database_conexion = "id5091632_damas";
$username_conexion = "id5091632_root";
$password_conexion = "";
$conexion = mysql_pconnect($hostname_conexion, $username_conexion, $password_conexion) or trigger_error(mysql_error(),E_USER_ERROR); 

en esta imagen se puede ver los datos de la base de datos
ayudenme porfavor…


Hi, your code looks fine to me, but I don’t know much about PHP. @ckhawand, can you take a look at this?


mysql has been deprecated as of PHP 7.
2 solutions:

  • Downgrade PHP version to 5.6 (Settings>General)
  • Use mysqli instead (more secure)


Thank you very much, I changed the php version and it worked


Let us know if you’ve any other issue :slight_smile: