fehler am ender einer php datei

Bleem

Gesperrt
*grübbel*

naja i was ja nit ob das was komisches is...bin ja noch nicht so lange dabei in der php welt...

aber i hab a php fiel mit 61 zielen...und er schreibt mir immer aus i hab in der zeile 62 an fehler...

i hab den ganzen code 10000000mal überprüft...find aber nix...es sind alle klammern richtig u.s.w

PHP:
<link rel="stylesheet" href="../css/style.css" type="text/css">

<?include("../more/connect.php");?>


<?

      if($action == "delete")
          {
               $delete = "delete from gbook where id = '$id'";
               if (mysql_query ($delete, $db))
               echo mysql_error ($db);
          }



      if ($send == "update")
          {
               $update = "update gbook set name = '$name', email = '$email', homepage = '$homepage', icq = '$icq', nachricht = '$nachricht' where id = '$id'";
               mysql_query ($update, $db);
          }
          else if($action == "edit")
          {
               $select = "select * from gbook where id = '$id'";
               $result = mysql_query ($select, $db);
               while ($variable = mysql_fetch_array ($result))
          {
?>


          <form action="gbook_add.php" method="post">

          name:<br><input type="Text" name="name" value="<?=$variable[1]?>" class="input" style="width=180px;"><br>
          email:<br><input type="Text" name="email" value="<?=$variable[2]?>" class="input" style="width=180px;"><br>
          homepage:<br><input type="Text" name="homepage" value="<?=$variable[3]?>" class="input" style="width=180px;"><br>
          icq:<br><input type="Text" name="icq" value="<?=$variable[4]?>" size="" class="input" style="width=180px;"><br>
          nachricht:<br><textarea name="nachricht" rows="5" style="border: 1px solid #000000;background-color: #cecece;width=180px;"><?=$variable[5]?></textarea>
          <input type="Submit" name="send" value="update" class="input">

          </form>


<?
     $select = "select * from gbook order by id desc";
     $result = mysql_query ($select, $db);


     while ($variable = mysql_fetch_array ($result))
          {

               echo "<br>";
               echo "$variable[0]<br>";
               echo "$variable[1]<br>";
               echo "$variable[2]<br>";
               echo "$variable[3]<br>";
               echo "$variable[4]<br>";
               echo "$variable[5]<br><br><a href=\"gbook_edit.php?action=delete&id=$variable[0]\">del</a> <a href=\"gbook_edit.php?action=edit&id=$variable[0]\">edit</a><br><br>";

          }

?>


danke schon mal für die hilfe !
 
Das ist doch nicht der ganze Code oder? Wenn doch, dann fehlt dort doch die schließende Klammer bei dem elseif in der oberen Hälfte.
 
neuer code :

PHP:
<link rel="stylesheet" href="../css/style.css" type="text/css">

<?include("../more/connect.php");?>


<?

      if($action == "delete")
          {
               $delete = "delete from gbook where id = '$id'";
               if (mysql_query ($delete, $db))
               echo mysql_error ($db);
          }



      if ($send == "update")
          {
               $update = "update gbook set name = '$name', email = '$email', homepage = '$homepage', icq = '$icq', nachricht = '$nachricht' where id = '$id'";
               mysql_query ($update, $db);
          }


      if($action == "edit")
          {
               $select = "select * from gbook where id = '$id'";
               $result = mysql_query ($select, $db);
               while ($variable = mysql_fetch_array ($result))
          {
?>


          <form action="gbook_add.php" method="post">

          name:<br><input type="Text" name="name" value="<?=$variable[1]?>" class="input" style="width=180px;"><br>
          email:<br><input type="Text" name="email" value="<?=$variable[2]?>" class="input" style="width=180px;"><br>
          homepage:<br><input type="Text" name="homepage" value="<?=$variable[3]?>" class="input" style="width=180px;"><br>
          icq:<br><input type="Text" name="icq" value="<?=$variable[4]?>" size="" class="input" style="width=180px;"><br>
          nachricht:<br><textarea name="nachricht" rows="5" style="border: 1px solid #000000;background-color: #cecece;width=180px;"><?=$variable[5]?></textarea>
          <input type="Submit" name="send" value="update" class="input">

          </form>


<?
     $select = "select * from gbook order by id desc";
     $result = mysql_query ($select, $db);


     while ($variable = mysql_fetch_array ($result))
          {

               echo "<br>";
               echo "$variable[0]<br>";
               echo "$variable[1]<br>";
               echo "$variable[2]<br>";
               echo "$variable[3]<br>";
               echo "$variable[4]<br>";
               echo "$variable[5]<br><br><a href=\"gbook_edit.php?action=delete&id=$variable[0]\">del</a> <a href=\"gbook_edit.php?action=edit&id=$variable[0]\">edit</a><br><br>";

          }

?>
 
Zurück