Ask coding questions

← Back to all posts
How to connect to an external mysql database?
baciotti (11)

I am trying to connect to mysql using php but the function is not working. I am receiving this error:

Fatal error: Uncaught Error: Call to undefined function mysqli_connect() in /home/runner/conexao.php:7 Stack trace: #0 /home/runner/carro_insert.php(6): include() #1 {main} thrown in /home/runner/conexao.php on line 7

<?php $servername = ""; $database = "sss"; $username="ssss"; $password="ssss"; $conexao=mysqli_connect($servername, $username, $password, $database); ?>
RonaldSchildge (1)

Has there been any help on how to enable the mysqli extension?

Liubov5 (0)

@baciotti did you get an answer?