KOL Update uitvoeren

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

// Connect de database
$db = JFactory::getDbo();
$query = $db->getQuery(true);
if (isset($_GET[“Verwijder”])) {
$query=’DELETE FROM korenonline WHERE `ID` = ‘.$id;
$db->setQuery($query);
$db->execute();
$id=””;

}else{

$set=”korenonline SET
`ID` = ‘” . $_GET[“ID”] . “‘,
`Koor` = ‘” . $_GET[“Koor”] . “‘,
`Wm` = ‘” . $_GET[“Wm”] . “‘,
`Url` = ‘” . $_GET[“Url”] . “‘,
`Org` = ‘” . $_GET[“Org”] . “‘,
`Template` = ‘” . $_GET[“Template”] . “‘,
`Byte` = ‘” . $_GET[“Byte”] . “‘,
`Euro` = ‘” . $_GET[“Euro”] . “‘,
`La` = ‘” . $_GET[“La”] . “‘,
`FTP-host` = ‘” . $_GET[“FTP-host”] . “‘,
`FTP-user` = ‘” . $_GET[“FTP-user”] . “‘,
`FTP-pw` = ‘” . $_GET[“FTP-pw”] . “‘,
`Mysql-host` = ‘” . $_GET[“Mysql-host”] . “‘,
`Mysql-user` = ‘” . $_GET[“Mysql-user”] . “‘,
`Mysql-pw` = ‘” . $_GET[“Mysql-pw”] . “‘,
`Mysql-db` = ‘” . $_GET[“Mysql-db”] . “‘,
`Opmerking` = ‘” . $_GET[“Opmerking”] .”‘”;

if (!empty($id)){
$wat=”UPDATE ” . $set . ” WHERE ID = “.$id;
}else{
$wat=”INSERT INTO “.$set;
}
$query=$wat;
$db->setQuery($query);
$result=$db->execute();
if (empty($id)) {
$id=$db->insertid();
};
}

header(“Location: update-invoer?ID=$id&OK=Uitgevoerd”);
?>
{/source}

Comments are closed.