lundi 30 septembre 2019

Fatal error: Uncaught Error: Call to undefined function mysqli_connect_erno() [duplicate]

This question already has an answer here:

I am a noob at web development, so please forgive the noobie question. I know that there is an issue with line 5, but I don't know why the function isn't found. I am pretty sure I typed it correctly. Exactly what is causing this error?

ERROR

Fatal error: Uncaught Error: Call to undefined function mysqli_connect_erno() in /opt/lampp/htdocs/demo/index.php:5 Stack trace: #0 {main} thrown in /opt/lampp/htdocs/demo/index.php on line 5

CODE


<?php
$con = mysqli_connect("localhost", "root", "", "social");

if(mysqli_connect_erno()) {
    echo "Failed to connect: " . mysqli_connect_erno();
}

?>


<html>
<head>
    <title></title>
</head>
<body>
Hello Dude!!!
</body>
</html>

FILE STRUCTURE enter image description here




Aucun commentaire:

Enregistrer un commentaire