Hallo miteinander
Daten werden nicht übergeben per $_POST. Was mache ich falsch..?
In der Abfrage-datei.php:
PHP-Code:
$abfrage = "SELECT * FROM links";
$result = mysql_query($abfrage);
echo '<table style="border-collapse:collapse;" cellspacing="0">';
while ($zeile = mysql_fetch_array( $result))
{
echo "<tr>";
echo '<td width="50" style="border-width:1px; border-color:rgb(0,102,204); border-style:dotted;">'. $zeile['id'] . "</td>";
echo '<td width="150" style="border-width:1px; border-color:rgb(0,102,204); border-style:dotted;">'. $zeile['name'] . "</td>";
echo '<td width="150" style="border-width:1px; border-color:rgb(0,102,204); border-style:dotted;">'. $zeile['url'] . "</td>";
echo '<td width="50" style="border-width:1px; border-color:rgb(0,102,204); border-style:dotted;">';
if ($zeile['banner'] == "ch")
{
echo "$ch";
}
if ($zeile['banner'] == "de")
{
echo "$de";
}
else
{
echo "" ;
}
echo "</td>";
echo '<td width="150" style="border-width:1px; border-color:rgb(0,102,204); border-style:dotted;">'. $zeile['beschreibung'] . "</td>";
// LOESCHEN
echo '<td width="100" style="border-width:1px; border-color:rgb(0,102,204); border-style:dotted;">';
echo '[url="vorloeschen.php?id=' . $zeile["]löschen[/url]';
echo "</td>";
// BEARBEITEN
echo '<td width="100" style="border-width:1px; border-color:rgb(0,102,204); border-style:dotted;">';
echo '<form name="uebergabe" method="POST" action="bearbeiten.php">';
echo '<input type="hidden" name="id" value="$zeile[id]">';
echo '<input type="hidden" name="name" value="$zeile[name]">';
echo '<input type="submit" name="submit" value="edit">';
echo "</form>";
echo "</td>";
echo "</tr>";
}
echo "</table>";
?>
in der "bearbeiten.php"
PHP-Code:
// UEBERGABE
$id = $_POST[id];
$name = $_POST[name];
<form method="POST" action="vorschau.php">
<table align="center" border="1" width="592">
<tr>
<td width="189">
ID</p>
</td>
<td width="387">
<input type="text" name="id" value="<?php echo $id ?>" size=" 50"></p>
</td>
</tr>
<tr>
<td width="189">
Name</p>
</td>
<td width="387">
<input type="text" name="name" value="<?php echo $name ?>" size=" 50"></p>
</td>
</tr>
<tr>
<td width="189">
</p>
</td>
<td width="387">
<input type="submit" value="speichern"></p>
</td>
</tr>
</table>
</form>
?>
Ausgegeben wird: $zeile[id] (so steht das im Textfeld)
Danke im voraus für Eure Hilfe..
Gruss Prinzli