Problems with PDO in Hostinger

0

How about, can someone help me with the following problem?

I have a web page which at the time of registering through a form, this sends the data to another page so that it creates a database of the user (creates a database, not a table on a base of data with user data). The problem is that when uploading it to Hostinger it does not create the database, I have already changed all the data of the connections, on the server I have put my mysql server that hostinger provides me as well as my username.

Does anyone know if it is possible to create databases in this way or can only be directly in the Hostinger phpmyadmin ?. On the local server works great.

Here is an example of the data of the connection that I have changed.

$base=new PDO('mysql:host=mysql.hostinger.co; 
dbname='.$usuario,'u561307665_root','51969075');

the variable $ user is the username received through the form.

    
asked by Valentin Villegas 16.05.2017 в 20:30
source

0 answers