Oppdater artikkel

query("UPDATE articles SET title = '$title' article ='$article' categoryId ='$categoryId' WHERE articleId ='$articleId'"); // Vi legger til addslashes for å kommentere ut evt, SQL injection... if (!$mysqli->query("UPDATE articles SET title = '" . addslashes($title) . "' article ='" . addslashes($article) . "' categoryId = " . $categoryId . " WHERE articleId = " . $articleId . ";")) { echo "Noe gikk galt..."; echo $mysqli->error; } else { echo 'Artikkelen er oppdatert i databasen'; } } else { ?>
query($selectQuery); while ($row = $result->fetch_array(MYSQLI_ASSOC)) { $categoryId = $row["categoryId"]; ?>
Tittel:
Tekst:
Kategori: