note 117007 added to function.pg-fetch-row
| From: | test at hotmail dot com | Date: | Wed, 01 Apr 2015 05:33:35 +0000 |
| Subject: | note 117007 added to function.pg-fetch-row | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-202112@lists.php.net to get a copy of this message | ||
<HTML>
<HEAD>
<script language="javascript">
function submittoevoegenform() {
//alert('functie uitgevoerd');
document.forms['frmLeerlingtoevoegen'].submit();
}
</script>
</HEAD>
<BODY>
<?php
include('connect.php');
//INSERT BEGIN
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
$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'];
$strTabel .= "<tr>
<td>$strVoornaam</td>
<td>$strNaam</td>
<td>$strPlaats</td>
</tr>";
}
//form toevoegen leerling (komt onderaan de tabel)
$strVoornaam = "<input type='text' name='txtVoornaam'>";
$strNaam = "<input type='text' name='txtNaam'>";
$strPlaats = "<input type='text' name='txtPlaats'>";
//$strSubmit = "<input type='submit' name='btnSubmit'
value='toevoegen'>";
$strSubmit = "<img width=20 height=20 src='figuren/toevoegen.png'
onclick='submittoevoegenform();'>";
$strTabel .= "<form method='post' name='frmLeerlingtoevoegen'
action='?actie=toevoegen'>
<tr>
<td>$strVoornaam</td>
<td>$strNaam</td>
<td>$strPlaats</td>
<td>$strSubmit</td>
</tr></form>";
$strTabel .= "</table>";
echo $strTabel;
?>
</body>
</html>
----
Server IP: 72.52.91.14
Probable Submitter: 78.20.148.32
----
Manual Page -- http://php.net/manual/en/function.pg-fetch-row.php
Edit -- https://master.php.net/note/edit/117007
Del: integrated -- https://master.php.net/note/delete/117007/integrated
Del: useless -- https://master.php.net/note/delete/117007/useless
Del: bad code -- https://master.php.net/note/delete/117007/bad+code
Del: spam -- https://master.php.net/note/delete/117007/spam
Del: non-english -- https://master.php.net/note/delete/117007/non-english
Del: in docs -- https://master.php.net/note/delete/117007/in+docs
Del: other reasons-- https://master.php.net/note/delete/117007
Reject -- https://master.php.net/note/reject/117007
Search -- https://master.php.net/manage/user-notes.php