0
Good morning,
The code below works local, but when upei gave the following error
Parse error: syntax error, unexpected '=>' (T_DOUBLE_ARROW), expecting ',' or ')' in D:\Inetpub\vhosts\....."caminho do arquivo)
Error code:
$conn = getConnection();
$stmt = $conn->prepare('SELECT senha, usuario FROM usuario where usuario.usuario = :cnpj');
$stmt->execute(['cnpj' => $cnpj]);
$resultado = $stmt->fetch();
$usuario = $resultado['usuario'];
$senha = $resultado['senha'];
Do you use php5.3? which version is?
– rray
I believe that that explain the problem.
– rray
In hosweb is 5.3, on my machine the 7. update to which version on the host and if you can not update how I can fix all "=>" without changing much in the code?
– Ermeson Oliveira
The ideal is to change the version of php, the 5.3 was released in 2009 ... almost 10 ago. in case you can not change the
['cnpj' => 'valor']
forarray('cnpj' => 'valor);
– rray