Fehler in Linkliste

matze93

Gesperrt
Hi Leute,
bei mir kommt bei der post.php eine Fehlermeldung in line 30.
Aber was ist da falsch?

add_link.html
Code:
<html>
<head>
<title>Link eintragen</title>
</head>
<body><form method="post" action="post.php">
<table width="100%" border="0">
  <tr>
    <td>Beschreibung:</td>
    <td><input name="beschreibung" type="text" maxlength="30"></td>
  </tr>
  <tr>
    <td>Link:</td>
    <td><input type="text" name="link" value="http://"></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><input type="submit" name="Button" value="Eintragen"></td>
  </tr>
</table></form>
</body>
</html>

links.php
PHP:
<html>
<head>
<title>Interne Linklist</title>
</head>
<body>
<center><table width="75%" border="0">
    <tr>
          <td>Links</td>
    </tr>
  <tr>
<td>
<?php
$datenbank = "links.dat"; 
$datei = fopen($datenbank,"r"); 
fpassthru($datei); 
?>
</td>
   </tr>
</table>
</center><br>
<center><a href="add_link.html" onClick="add_link.html', 'Name','toolbar=no,status=no,menubar=no,width=520,height=100')" onmouseover="status='Link eintragen';return true;" onmouseout="status='';return true;">Link eintragen</a>
<br>
<a href="javascript:history.back()">Zurück</a></center>
</body>
</html>

post.php
PHP:
<html>
<head>
<title>Link eintragen</title>
</head>

<body>
<?php
{

$daten = file("links.dat"); 
$position = array_search("<!--markierung--> " . $eintrag, $daten);

$daten[$position] = "<!--markierung-->  
    <tr>
      <td bgcolor='EFEFEF'><a href='$link' target='_blank'>$beschreibung</a></td>
    </tr>";
  
$fd = fopen ("links.dat", "w") or die ("File open error"); 

for ($i=0; $i < sizeof($daten); $i++) 
{
fputs($fd,$daten[$i]);
}
fclose ($fd) or die ("File close error"); 

?>

<center>Eintragung war erfolgreich</center>
</body>
</html>

Schon mal danke im Voraus
 

Neue Beiträge

Zurück