ich habe ein Formular erstellt aber
er speichert nicht
kann mir jemand sagen was ich falsch gemacht habe es kommt keine fehler meldung auch nciht es die speicherung erfolgreich war ??
Code:
<?php
if (isset($u)) {$u=(int)$u;} else {echo'main - no user_id';die;}
if (isset($sid)) {$sid=trim($sid);} else {echo'main - no user_id';die;}
if (isset($f)) {$f=(int)$f;} else {echo'main - no akt_feld';die;}
require('fns.php');
if (connect_db()==1) {echo'Fehler: Verbindung zur Datenbank nicht möglich.</center></body></html>';@mysql_close();die;}
if (check_id($u,$sid)==1) {echo'<html><body>access denied or session timed-out</body></html>';@mysql_close();die;}
if (check_fd($u,$f)==1) {echo'<html><body>sorry, dieses feld gehört dir nicht</body></html>';@mysql_close();die;}
echo'<html><link rel=stylesheet type=text/css href=style.css><body><center>';
?>
<td colspan="4">Dorfeinstellungen</td>
<div align="center">
<?php
print '<table width="600" border="0">
<tr>
</tr>';
global $d;
$result=mysql_query("select * where feld_id='$d'");
print '<form action="edit.php?u='.$u.'&sid='.$sid.'&f='.$f.'" method="post">';
echo "Dorfname" . $result['dorfname'];
?>
<?php
echo ' <INPUT TYPE="text" NAME="'.$dorfname.'" ';
PRINT ' SIZE="20" MAXLENGTH="20">
';
PRINT "Dorfbild";
PRINT ' <INPUT TYPE="text" NAME="'.$dorfbild.'" ';
PRINT ' SIZE="20" MAXLENGTH="89">';
?>
<?php
$dorfname=$_POST['dorfname'];
$dorfbild=$_POST["dorfbild"];
$query = "UPDATE landkarte
SET dorfnamee='$dorfname',
dorfbild='$dorfbild'
WHERE feld_id = $f";
$result=mysql_query($query);
print ' <input type="submit" name="Submit" value="Speichern" class="button"/>';
?>