Ben ik weer.. met 'n volgend probleem waar ik tegenaan loop. Mijn code
<?php
include('config.php');
// melding maken als er een fout is
function mysql_die($fout = "Database foutje!")
{
echo "<H1>fout:". $fout."</H1>";
exit;
}
// query maken om naam op te halen
$req = $_GET['id'];
$selecteren = "SELECT * FROM pvdp_tpl WHERE id='$req'";
$inhoud = mysql_query ($selecteren);
$inhoud =mysql_fetch_object($inhoud);
mysql_free_result($inhoud);
?>
<?php echo "<p>". $inhoud."<p>"; ?>
Nu krijg ik de volgende fouten :
Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /home/pvdp/domains/devolusion.nl/public_html/scripten/opvragen.php on line 17
Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/pvdp/domains/devolusion.nl/public_html/scripten/opvragen.php on line 18
$req = $_GET['id'];
$selecteren = "SELECT * FROM pvdp_tpl WHERE id='$req'";
if($resultaat = mysql_query ($selecteren))
{
//wat hij moet doen als het lukt
$inhoud = mysql_fetch_object($resultaat);
mysql_free_result($resultaat );
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1'' at line 1
Notice: Undefined variable: inhoud in /home/pvdp/domains/devolusion.nl/public_html/scripten/opvragen.php on line 21
Notice: Undefined variable: inhoud in /home/pvdp/domains/devolusion.nl/public_html/scripten/opvragen.php on line 21
Notice: Undefined variable: inhoud in /home/pvdp/domains/devolusion.nl/public_html/scripten/opvragen.php on line 21