database connection fejl php.
Får denne fejl :Warning: mysqli_connect(): (42000/1044): Access denied for user 'elev05'@'%' to database 'golfen' in D:sites\index.php on line 64 Warning: mysqli_error() expects exactly 1 parameter, 0 given in D:sites\index.php on line 64
Og det her er koden. Host og password er erstattet med de ord.
$conn = mysqli_connect("HOST","elev05","PASSWORD","golfen") or die (mysqli_error());
$query = mysqli_query($conn, "select * from golfen") or die (mysqli_error($conn));
$resultat=mysqli_query($conn, $mysqli_query);
while ($row = mysqli_fetch_array($resultat)){
echo "row['index']";
}
mysqli_close($conn);
?>