I get a Call to undefined function mysql_query() error in my code, i don't know what i do wrong. Can somebody help me?
<?php
$sqlcheck = "SELECT * FROM product";
$result = mysql_query($conn, $sqlcheck); <====== 'Xampp says the error is in this line'
$resultCheck = mysql_num_rows($result);
if ($resultCheck > 0) {
while ($row = mysqli_fetch_assoc($result)) {
echo $row . "<br>";
}
}
?>
I checked the connection with a cath error, and the connection works so nothing wrong with that. $conn is defined in another file which i did connect to my php file with this code:
include_once('includes/dbh.inc.php');
So i hope somebody can help me. Thanks