As I was advised I have changed from mySQL to PDO calls yet I can’t seem to get past accessing the actual database as below
$db = new PDO("mysql:host=localhost;dbname=info;charset=UTF-8", 'admin', 'xxxxxx');
as it returns
Parse error: syntax error, unexpected T_VARIABLE in db.php on line 8
I have checked through forums and from what I’ve read the server does support PDO , furthermore phpinfo() is disabled for security reasons so I can’t turn to that, Have i actualy made an error in the string or does it mean my server does not yet support PDO ?
You might want to try rewriting the problematic line from scratch and delete the old line completely. I’ve had several issues, where I’m facing
unexpected T_VARIABLE– error with no obvious reason. I think it’s because I’ve managed to use some kind of key combination on my laptop’s keyboard, which causes some non-visible character to get amongst my code.After rewriting the line, the problem is usually gone.