0
having problem in php
Have this error, Notice: Undefined variable: conn.... and Warning: mysqli_query() expects parameter 1 to be mysqli, null given ..... don't know what's wrong. help!
3 Respuestas
+ 3
Did you forget to include the connection file?
+ 2
it seems that you didn’t well defined var $conn (with the database configuration) that’s must be the first param of musqli_connect function...
ex:
$conn = mysqli_connect(“localhost”, “admin”, “12345”, “mydatabase”);
msqli_query($conn, “SELECT * FROM table”);
+ 1
yes i just forgot to include the connection. thanks