die kleine handliche web-basierte Notiz/Adress-Datenbank fuer php/mysql
This commit is contained in:
parent
0bffe48b4b
commit
c84e8b144f
26 changed files with 1363 additions and 0 deletions
47
notiz-datenbank/edit_notiz_formular.php
Normal file
47
notiz-datenbank/edit_notiz_formular.php
Normal file
|
@ -0,0 +1,47 @@
|
|||
<?PHP
|
||||
|
||||
// von aussen kommt die Variable $notiz_id mit der Nummer des Notiz-Eintrags
|
||||
// bzw. sie ist nicht gesetzt für einen Neuen
|
||||
// ausserdem wird die $mensch_id uebergeben
|
||||
|
||||
|
||||
include_once("init.php");
|
||||
|
||||
|
||||
importPOST("notiz_id");
|
||||
|
||||
if (!isset($notiz_id)) $notiz_id = -1;
|
||||
|
||||
// falls eine bestehende Nummer bearbeitet werden soll
|
||||
if ($notiz_id > -1)
|
||||
{
|
||||
$result = mysql_query("SELECT * FROM Notizen WHERE notiz_id='$notiz_id'");
|
||||
$infos = mysql_fetch_array($result);
|
||||
$notiz = $infos["Notiz"];
|
||||
}
|
||||
else
|
||||
// eine neue Nummer wird angelegt
|
||||
$notiz = "";
|
||||
|
||||
?>
|
||||
|
||||
<P>
|
||||
<DIV ALIGN="CENTER">
|
||||
<form name="Notiz" action="edit_notiz.php?<?PHP print SID; ?>" method="post">
|
||||
<DIV ALIGN="CENTER">
|
||||
<table border="2" cellpadding="4" cellspacing="2">
|
||||
<tr> <td>Notiz: <input type="text" name="notiz"
|
||||
SIZE="35" value="<?PHP echo $notiz; ?>">
|
||||
</TD></TR>
|
||||
</table>
|
||||
</DIV>
|
||||
<input type="hidden" name="notiz_id" value="<?php echo $notiz_id; ?>">
|
||||
<INPUT TYPE="HIDDEN" NAME="submitNotiz" VALUE="edit">
|
||||
<INPUT TYPE="hidden" NAME="mensch_id"
|
||||
VALUE="<?PHP print $mensch_id; ?>">
|
||||
<DIV ALIGN="CENTER"><input type="submit" value=" Eintragen "
|
||||
ACCESKEY=" "></DIV>
|
||||
|
||||
</FORM>
|
||||
</DIV>
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue