Exemple #1
0
<?php

$pageName = "Poista sivu / uutinen";
require_once "artikkeli.php";
if (isset($_POST['poista'])) {
    $id = $_POST['poista'];
    try {
        require_once "artikkeliPDO.php";
        $dbactions = new artikkeliPDO();
        $dbactions->poistaArtikkeli($id);
    } catch (Exception $error) {
        print $error->getMessage();
    }
}
?>

<?php 
require "top.php";
?>
	<form name="poistolomake" action="#" method="post">
	<?php 
try {
    require_once "artikkeliPDO.php";
    $dbactions = new artikkeliPDO();
    $artikkelit = $dbactions->kaikkiArtikkelit();
} catch (Exception $error) {
    print $error->getMessage();
}
?>
    <br>
    <h3>Sivut</h3>