note 117001 deleted from function.pg-fetch-assoc by salathe

From: Date: Wed, 01 Apr 2015 08:08:01 +0000
Subject: note 117001 deleted from function.pg-fetch-assoc by salathe
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-202114@lists.php.net to get a copy of this message
Note Submitter: test at hotmail dot com ---- <HTML> <HEAD> <script language="javascript"> function submittoevoegenform() { //alert('functie uitgevoerd'); document.forms['frmLeerlingtoevoegen'].submit(); } function submitaanpassenform() { //alert('functie uitgevoerd'); document.forms['frmLeerlingaanpassen'].submit(); } </script> </HEAD> <BODY> <?php //connectie include('includes/connect.php'); //UPDATE QUERY BEGIN if(isset($_GET['actie']) AND $_GET['actie']=='opslaan'){ $intId = $_GET['id']; $strVoornaam = $_POST['txtVoornaam']; $strNaam = $_POST['txtNaam']; $strPlaats = $_POST['txtPlaats']; $strSqlupdate = "UPDATE tblleerlingen SET voornaam = '$strVoornaam', naam = '$strNaam', plaats = '$strPlaats' WHERE tblleerlingen.leerlingid = $intId;"; $mysqli->query($strSqlupdate); } //UPDATE QUERY EINDE //DELETE BEGIN if(isset($_GET['actie']) AND $_GET['actie']=='verwijderen'){ $intId = $_GET['id']; $strSqldelete = "DELETE FROM tblleerlingen WHERE tblleerlingen.leerlingid = $intId;"; $mysqli->query($strSqldelete); } //DELETE EINDE //INSERT BEGIN //dit voegden we als eerste toe. Als we kijken naar de isset van de tekstvakken hebben //we een probleem als we willen wijzigen en dat ook dezelfde tekstvakken zijn. Je moet dan of met andere tekstvaknamen werken of //ook hier met een actie werken. Het formulier frmLeerlingtoevoegen is dan ook hiervoor aangepast. //if(isset($_POST['txtVoornaam']) AND isset($_POST['txtNaam']) AND isset($_POST['txtPlaats']) ){ if(isset($_GET['actie']) AND $_GET['actie']=='toevoegen'){ $strVoornaam = $_POST['txtVoornaam']; $strNaam = $_POST['txtNaam']; $strPlaats = $_POST['txtPlaats']; $strSqlinsert = "INSERT INTO tblleerlingen (leerlingid, voornaam, naam, straatennr, postnr, plaats, geboortedatum, klasid) VALUES (NULL, '$strVoornaam', '$strNaam', '', '', '$strPlaats', '0000-00-00', '0');"; $mysqli->query($strSqlinsert); } //INSERT EINDE

« previous php.notes (#202114) next »