Ok mache ich, wenn ich zu hause bin, bin gerade in der Schule, ich füge es als Edit hinzu!
MfG Marcel
Edit:
Ok die aendern.php hat zur Zeit folgenden Stand:
Code: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
| <?php error_reporting(E_ALL); include ('../inc/config.php'); // Konfigurationsdatei laden @mysql_connect(MYSQL_HOST, MYSQL_USER, MYSQL_PASS) OR die(mysql_error()); @mysql_select_db('Verein') OR die('Kann keine Verbindung zur Datenbank herstellen'); if(!isset($_GET['ID']) || ((int)$_GET['ID']) <= 0) die('Da stimmt was nicht'); $id = (int)$_GET['ID']; $query = 'SELECT ID,Titel,Autor,Email,Homepage,Inhalt,Datum FROM news WHERE ID =.$id';
if($sql = @mysql_query($query)) { echo '<h1 align="center">News editieren</h1>'; echo '<table border="1" align="center" width="800" cellsparring="5">'; echo '<form method="post" action="edit_news.php">'; while($row = mysql_fetch_assoc($sql)) { echo '<tr><td align="center" width="50"><b>'.$row['ID'].'</b></td>'; echo '<th colspan="6" align="center">geschrieben am: '.$row['Datum'].'</th>'; echo '</tr>'; echo '<tr>'; echo '<td align="center">Autor</td>'; echo '<td align="left"><input type="text" name="Autor" value="'.$row['Autor'].'"></input></td>'; echo '<td align="center" width="200">E-Mail</td>'; echo '<td align="left"><input type="text" name="Email" value="'.$row['Email'].'"></input></td>'; echo '<td align="center" width="200">Homepage</td>'; echo '<td align="left"><input type="text" name="Homepage" value="'.$row['Homepage'].'"></input></td>'; echo '</tr>'; echo '<tr></tr>'; echo '<tr>'; echo '<td align="center">Titel</td>'; echo '<th align="center" colspan="5"><input size="50" type="text" name="Titel" value="'.$row['Titel'].'"></input></th>'; echo '</tr>'; echo '<tr>'; echo '<td align="center">Inhalt</td>'; echo '<th colspan="5" height="30"><textarea name="Inhalt" cols="57" rows="15">'.$row['Inhalt'].'</textarea></th>'; echo '</tr>'; } echo '</table>'; echo '<td>'; echo '<input type="submit" value="Ändern"></input>'; echo '</td>'; echo '</form>'; } ?> |
MfG Marcel
Dieser Beitrag wurde insgesamt 1 mal editiert. Das letzte mal 20.11.2007, 16:05 von Mars.
|