Updaten details korenonline deelnemer

{source}
<?php
$id=$_GET[“ID”];
// Connect de database

$db = JFactory::getDbo();
$query = $db->getQuery(true);
if ($id) {
$query =”SELECT * FROM korenonline WHERE ID = $id”;
}else{
$query =”SELECT * FROM korenonline”;
}
$db->setQuery($query);
$db->execute();
$rows = $db->loadAssoc();

// Toon de gevonden gegevens

if ($_GET[“OK”]) {
echo “<h1>Deze update werd “.$_GET[“OK”].”</h1>”;
}
?>
<h2>Muteren korenonline informatie</h2>
<form action=”update-uitvoeren?id=<?=$rows->ID?> method=”get”>
<input type=”submit” class=”button” name=”Wijzig” value=”Wijzig”> <input type=”submit” name=”Verwijder” class=”button” value=”Verwijder”>
<hr />
<table class=”table”><tr><td><table>
<?php
echo ‘<tr><td colspan=”2″><h3>Algemene gegevens</h3></td></tr>’;
foreach($rows as $column => $value) {
if ($id) {
echo ‘<tr><td >’. $column . ‘</td><td><input type=”text” name=”‘ . $column . ‘” value=”‘ . $value . ‘” size=”50″</td></tr>’;
if ($column == “FTP-host”) {
if ($value == “Byte”) { break; };
echo ‘</td></tr></table><td ><table>’;
echo ‘<tr><td colspan=”2″><h3>Gegevens ledenadmi (geen Byte)</h3></td></tr>’;
}
}else{
if ($column == “FTP-host”) {
echo ‘</td></tr></table><td ><table>’;
echo ‘<tr><td colspan=”2″><h3>Gegevens ledenadmi (geen Byte)</h3></td></tr>’;
}
echo ‘<tr><td>’. $column . ‘</td><td><input type=”text” name=”‘ . $column . ‘”</td></tr>’;
}
}

?>

</td></tr></table>
</table>
</form>
<hr /><p><small><i>Versie 2.0 d.d. 20-08-2016</i></small></p>

{/source}

Comments are closed.