note 117006 deleted from function.pg-fetch-row by salathe
| From: | salathe@php.net | Date: | Wed, 01 Apr 2015 08:08:28 +0000 |
| Subject: | note 117006 deleted from function.pg-fetch-row by salathe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-202117@lists.php.net to get a copy of this message | ||
Note Submitter: test at hotmail dot com
----
<HTML>
<HEAD>
</HEAD>
<BODY>
<?php
include('connect.php');
//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
$strSql = "select * from tblleerlingen ORDER BY leerlingid";
$strResult = $mysqli->query($strSql);
$strTabel = "<table border='1'>";
while($strRij = $strResult->fetch_assoc()){
$strVoornaam = $strRij['voornaam'];
$strNaam = $strRij['naam'];
$strPlaats = $strRij['plaats'];
$intLeerlingid = $strRij['leerlingid'];
$strLinkverwijderen = "<a
href='?actie=verwijderen&id=$intLeerlingid'>verwijder</a>";
$strTabel .= "<tr>
<td>$strVoornaam</td>
<td>$strNaam</td>
<td>$strPlaats</td>
<td>$strLinkverwijderen</td>
</tr>";
}
echo $strTabel;
?>
</body>
</html>