예제 #1
0
<?php

require_once "module.class.php";
require_once "moduleLijst.class.php";
if ($_GET["action"] == "verwerk") {
    $module = new Module($_GET["id"], $_POST["naam"], $_POST["prijs"]);
    $ml = new ModuleLijst();
    $ml->updateModule($module);
    $updated = true;
}
?>
<!DOCTYPE HTML>
<html>
<head>
<meta charset=utf-8>
<title>Modules</title>
</head>
<body>
	<h1>Module bewerken</h1>
	<?php 
if ($updated) {
    print "Record bijgewerkt!";
}
$ml = new ModuleLijst();
$module = $ml->getModuleById($_GET["id"]);
?>
	<form action="modulebewerking.php?action=verwerk&id=<?php 
print $_GET["id"];
?>
" method="post">
		Naam:
<?php

//dbGegevensBewerken.php
require_once "Module.php";
require_once "ModuleLijst.php";
$updated = false;
if (isset($_GET["action"]) && $_GET["action"] == "verwerk") {
    $module = new Module($_GET["id"], $_POST["naam"], $_POST["prijs"]);
    $modLijst = new ModuleLijst();
    $modLijst->updateModule($module);
    $updated = true;
}
?>


<!DOCTYPE HTML>
<html>
	<head>
		<meta charset=utf-8>
		<title>Modules</title>
	</head>
	<body>
		<h1>Module bewerken</h1>
		<?php 
if ($updated) {
    print "Record bijgewerkt!";
}
$modLijst = new ModuleLijst();
$module = $modLijst->getModuleById($_GET["id"]);
?>
		<form action="dbGegevensBewerken.php?action=verwerk&id=