I have a problem with some PHP, and MYSQL code.
<?php
if(isset($_GET['article_id']))
{
require('../config.php');
$opdracht = "SELECT * FROM app WHERE article_id = " . $article_id;
$resultaat = mysqli_query($mysqli, $opdracht);
if($rij = mysqli_fetch_array($resultaat))
{
?>
He get the info from a specific ID in the database:
<?php echo $rij['bericht']; ?>
} else {
echo "Fout bij ophalen: <br/>";
echo $opdracht ."<br/>";
echo mysqli_error($mysqli). "<vr/>";
By the echo error i get this:
Warning: mysqli_error() expects parameter 1 to be resource, null given in
Whats go wrong?
Julian
0 comments:
Post a Comment