how to connect to Phpmyadm database?

Asked

Viewed 39 times

0

he make that mistake here: Uncaught Error: Call to Undefined Function mysql_connect()

I can’t connect to the database.

inserir a descrição da imagem aqui

1 answer

2

You forgot to put an "i"...

$con = new mysqli($Conexao, $User $Senha, $Database))

It Creates the Connection For you, where:
$Conexao = localhost (no teu caso)
$Database = Nome da tua base de dados...

$consulta = "SUA QUERY"; $resultado = $con->query($consulta );

This Executes the Query for you.

while($row = $resultado->fetch_assoc()) { echo "Dado: ".$row["dado"].";"; }

With this While you take the data that your query Returned.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.