HTML interesse |
|
Wat is er hier verkeerd aan de query? Want in de echo is de juiste waarde wel te zien die gewijzigd is.. Alleen word het niet naar de database geschreven...
<?php
$db= sqlite_open("blogdb.sdb");
$sql="UPDATE BlogItems SET (BlogItemTitle, BlogItemAuthor, BlogItemDate, BlogItemText)";
$sql .= "VALUES ('";
$sql .= $_POST["BlogItemTitle"] ."', '" ;
$sql .= $_POST["BlogItemAuthor"] ."', '" ;
$sql .= $_POST["BlogItemDate"] ."', '" ;
$sql .= $_POST["BlogItemText"] ."');";
//$result = sqlite_query($db, $sql) or die ("FOUT: " . sqlite_last_error());
echo("<h2>Blogitem successfully updated</h2>");
echo("The following data have been inserted:<br/><br/>\n");
echo("Title: <b>". $_POST["BlogItemTitle"] . "</b><br/>");
echo("Author: <b>". $_POST["BlogItemAuthor"] . "</b><br/>");
echo("Date: <b>". $_POST["BlogItemDate"] . "</b><br/>");
echo("Text: <b>". $_POST["BlogItemText"] . "</b><br/>");
echo("<br/><a href=\"admin.php\">back to admin</a>");
?>
<?php $db= sqlite_open("blogdb.sdb"); $sql="UPDATE BlogItems SET (BlogItemTitle, BlogItemAuthor, BlogItemDate, BlogItemText)"; $sql .= "VALUES ('"; $sql .= $_POST["BlogItemTitle"] ."', '" ; $sql .= $_POST["BlogItemAuthor"] ."', '" ; $sql .= $_POST["BlogItemDate"] ."', '" ; $sql .= $_POST["BlogItemText"] ."');"; //$result = sqlite_query($db, $sql) or die ("FOUT: " . sqlite_last_error()); echo("<h2>Blogitem successfully updated</h2>"); echo("The following data have been inserted:<br/><br/>\n"); echo("Title: <b>". $_POST["BlogItemTitle"] . "</b><br/>"); echo("Author: <b>". $_POST["BlogItemAuthor"] . "</b><br/>"); echo("Date: <b>". $_POST["BlogItemDate"] . "</b><br/>"); echo("Text: <b>". $_POST["BlogItemText"] . "</b><br/>"); echo("<br/><a href=\"admin.php\">back to admin</a>"); ?>
|