Ik heb een scriptje en als ik het wil uitvoeren krijg ik de volgende foutmelding:
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 '
Weten jullie wat de fout is?
Dit is de broncode:
Database verbinding is al gemaakt (niet weergegeven) en die is goed.
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 '
Weten jullie wat de fout is?
Dit is de broncode:
Database verbinding is al gemaakt (niet weergegeven) en die is goed.
PHP:
<?
if(isset($_POST['save'])){
$id = $_POST['id'];
$foto= $_POST['elm1'];
$testinh = $_POST['test'];
$mouse = "onmouseover='javascript:foto("$testinh")'";
$bron = '<img src='.$testinh.' width="100" />';
$inh = "<img src='$testinh' width='100' $mouse/>";
$query = mysql_query("SELECT * FROM pagina WHERE id='".$id."'");
$result = mysql_fetch_array($query);
$titel = $result['inhoud'];
echo $inh;
$opdr = 'INSERT INTO ' . $titel . ' (inhoud) VALUES (' . $inh. ')';
echo $opdr;
mysql_query($opdr) or die (mysql_error());
echo $mouse;
}
else{
}
?>
Laatst bewerkt: