This was part of the DB config i downloaded.

$odb = new PDO('mysql: host=' . DB_HOST . ';dbname=' . DB_NAME, DB_USER, DB_PASS);

When i try and add my stuff i get

Parse error: syntax error, unexpected T_STRING in /home/a4455684/public_html/config.php on line 7

This is what it looks like when i add my stuff

$odb = new PDO('mysql: host='mysql5.000webhost.com';dbname='a4455745_lool,a4454514_root, Examplepass123);

Thanks in advance if you take the time to help!

The PDO connection takes 3 arguments: the first is used to set the kind of database mysql: then you set the hostname host= and the database name dbname=; the second argument is the username; and the last one is the password. All these values are strings, so use the quotes:

$odb = new PDO("mysql:host=mysql5.000webhost.com;dbname=a4455745_lool", "a4454514_root", "Examplepass123");
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.