smokey-joe
Mitglied
Siehe Titel :
Hier der Code der duchläuft aber nichts in der Datenbank ändert.
hoffnungsvoll
smokey-joe
Hier der Code der duchläuft aber nichts in der Datenbank ändert.
PHP:
<?php
$pdo = new PDO('mysql:host=localhost;dbname=aquarium', 'mein_db_username', 'mein_db_PW');
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$id = (int) $_GET['id'];
if($_GET[name]=="" || $_GET[gattung]=="" || $_GET[geschlecht]=="" )
{
echo "Name, Gattung und Geschlecht muss ausgefüllt werden";
}
else
{
$ergebnis = "UPDATE aqua SET name = :$name, gattung = :$gattung, geschlecht = :$geschlecht, WHERE id = :$id";
if($ergebnis)
{
echo "Fisch wurde bearbeitet!";
}
}
?><style type="text/css"> <!-- body {
background-color: #02679D;
}
a:link {
color: #FFFFFF;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #CCCCCC;
}
a:hover {
text-decoration: underline;
}
a:active {
text-decoration: none;
color: #CCCCCC;
}
body,td,th {
font-size: 14px;
color: #FFFFFF;
}
--> </style>
<div align="center"><a href="form.php"><strong>Zurück</strong></a></div>
hoffnungsvoll
smokey-joe