Can't connect to database (using pdo)

I can’t connect to the database. Can anybody help me? I also checked my old website which has also a connection to a database and that connection isn’t working now.

My code:

<?php $user = 'id3308569_database'; $pass = 'password'; $pdo = new PDO('mysqli:host=localhost;dbname=id3308569_database', $user, $pass);

Does it throw any error?

I already fixed the problem.

Glad to hear that
Do post again anytime

1 Like