Johannes Völlinger: Fehler beim einlesen der Daten in Tabelle

Hi!

Habe nen komischen Fehler, und zwar lese ich meine Daten aus der Datenbank in ein Tabellengerüst ein, aber je mehr Einträge eingetragen werden, desto tiefer rückt die gesamte Tabelle vom Ausgangspunkt weg. Woran liegt das, der Quellcode scheint sauber zu sein?

Vielen Dank schonmal im vorraus!
Johannes

  1. Woran liegt das, der Quellcode scheint sauber zu sein?

    Hallo,

    poste mal Deinen Quelltext.

    Kiska

    1. poste mal Deinen Quelltext.

      <html>
      <head>
      <title>Schritt 2 von 4: Auswahl der Unterkunft</title>
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
      </head>
      <body bgcolor="#FFFFFF" text="#000000">
      <i><font color="#0000CC"><b>Ihre Reise nach:Aspen</b></font></i><br /><br />
      <font size="4">>> Schritt 2 von 4: Auswahl der Unterkunft</font>
      <table width="75%" align="center">
      <tr><td rowspan="2" width="25%" align="center" valign="top"><img src="Bilder/Unterkunft/chateau_aspen.jpg" width="150" height="125" border="2"></td>
      <td><font size="4"><b>The Gant</b></font></td></tr>
      <tr><td>The Gant is ideally at the foot of Ajax, 3 blocks from downtown Aspen and the gondola. All units are fully equipped with kitchen, fireplace and balcony. On-site recreation includes two heated pools, three hot tubs, two saunas and an exercise facility. This ideal group property offers a front desk, group gathering area and free transportation in addition to the town shuttle service.</td></tr><br />
      <tr><td> </td><td> </td></tr>
      <tr><td rowspan="2" width="25%" align="center" valign="top"><img src="Bilder/Unterkunft/standard.gif" width="150" height="125" border="2"></td>
      <td><font size="4"><b>Molly Gibson Lodge</b></font></td></tr>
      <tr><td>Small, intimate, with an emphasis upon guest services, the Molly Gibson Lodge offers a variety of room styles featuring wood-buring fireplaces, in-room Jacuzzis, and one- and two-bedroom apartments. A daily complimentary breakfast is featured and a courtesy van is on call for airport and activities. Located 3 blocks from city center and on the free skier shuttle route. Easy walking to Aspen's many amenities.</td></tr><br />
      <tr><td> </td><td> </td></tr>
      <tr><td rowspan="2" width="25%" align="center" valign="top"><img src="Bilder/Unterkunft/standard.gif" width="150" height="125" border="2"></td>
      <td><font size="4"><b>Aspen Mountain Lodge</b></font></td></tr>
      <tr><td>One of Aspen's most popular and affordable lodges, the Aspen Mountain Lodge is located next to the skier shuttles. The rooms are comfortable and versatile, each having two or more beds with one queen. All rooms include a wet bar with small refrigerator and many have balconies with mountain views and Jacuzzi whirlpool baths. An outdoor Jacuzzi and pool are also available.</td></tr><br />
      <tr><td> </td><td> </td></tr>
      <tr><td rowspan="2" width="25%" align="center" valign="top"><img src="Bilder/Unterkunft/standard.gif" width="150" height="125" border="2"></td>
      <td><font size="4"><b>Fasching Haus</b></font></td></tr>
      <tr><td>An elegant courtyard serves as the centerpiece of the Fasching Haus Condominiums. The outdoor heated pool and Jacuzzi are situated here, offering guests a perfect place to relax. Ideal for families, single and small meetings, these studio to four bedroom residences are known for their comfort and convenience. Each residence is individually decorated and full kitchens, fireplaces and cable TV are standard. The check-in office and concierge are located on-site. A small meeting room is available for wine and cheese parties or group functions. </td></tr><br />
      <tr><td> </td><td> </td></tr>
      <tr><td rowspan="2" width="25%" align="center" valign="top"><img src="Bilder/Unterkunft/Alpenblick.jpg" width="150" height="125" border="2"></td>
      <td><font size="4"><b>Alpenblick</b></font></td></tr>
      <tr><td>Carved decks with wooden shutters create a Bavarian ambience at the Alpenblick Townhomes. Modeled after European ski lodges, these charming three and four bedroom townhomes are located just a short distance from downtown Aspen. Each unit has two or three levels and features full kitchens, wood burning or gas log fireplaces, color cable TV, and telephones. Some units feature a den. After an invigorating day on the slopes, relax in the outdoor heated pool and Jacuzzi. Concierge and bellman services. On-site Management.</td></tr><br />
      <tr><td> </td><td> </td></tr>
      <tr><td rowspan="2" width="25%" align="center" valign="top"><img src="Bilder/Unterkunft/standard.gif" width="150" height="125" border="2"></td>
      <td><font size="4"><b>Durant</b></font></td></tr>
      <tr><td>The Durant condominiums feature spacious living rooms with color TV, fully-equipped kitchens, maid service and fireplaces (most units). In the three bedroom units, floor to ceiling windows open to panoramic views of the mountain and the authentic Victorian town of Aspen. The outdoor heated pool and Jacuzzi are loacted just outside your door to enjoy. Ski to and from the lifts on Aspen Mountain. Concierge and bellman services. Maid service. Meeting room available. Steps from downtown and gondola.</td></tr><br />
      <tr><td> </td><td> </td></tr>
      </table>
      </body>
      </html>

      1. poste mal Deinen Quelltext.
        <html>
        <head>

        süß..
        aber ich meinte den PHP-Code, und nach möglichkeit nur das Wesentliche (die besagte Tabelle)

        Kiska

        1. aber ich meinte den PHP-Code, und nach möglichkeit nur das Wesentliche (die besagte Tabelle)

          Ach entschuldige bitte.

          <?
          echo "\n<table width="75%" align="center">";
          ...
          while($ergebnis=mysql_fetch_array($result)){
          if($ergebnis[Bild_Url]==Null)
          echo "\n<tr><td rowspan="2" width="25%" align="center" valign="top"><img src="Bilder/Unterkunft/standard.gif" width="150" height="125" border="2"></td>";
          else
          echo "\n<tr><td rowspan="2" width="25%" align="center" valign="top"><img src="Bilder/Unterkunft/$ergebnis[Bild_Url]" width="150" height="125" border="2"></td>";
          echo "\n<td><font size="4"><b>$ergebnis[Name_Untk]</b></font></td></tr>";
          echo "\n<tr><td>$ergebnis[Beschreibung]</td></tr><br />";
          echo "\n<tr><td> </td><td> </td></tr>";
          }
          echo "\n</table>";
          ?>

          1. <?
            echo "\n<table width="75%" align="center">";
            ...
            while($ergebnis=mysql_fetch_array($result)){
            if($ergebnis[Bild_Url]==Null)
            echo "\n<tr><td rowspan="2" width="25%" align="center" valign="top"><img src="Bilder/Unterkunft/standard.gif" width="150" height="125" border="2"></td>";
            else
            echo "\n<tr><td rowspan="2" width="25%" align="center" valign="top"><img src="Bilder/Unterkunft/$ergebnis[Bild_Url]" width="150" height="125" border="2"></td>";
            echo "\n<td><font size="4"><b>$ergebnis[Name_Untk]</b></font></td></tr>";
            echo "\n<tr><td>$ergebnis[Beschreibung]</td></tr><br />";

            ^^^^^^

            echo "\n<tr><td> </td><td> </td></tr>";
            }
            echo "\n</table>";
            ?>

            Den "Wurm" habe ich Dir markiert.

            Kiska

            1. echo "\n<tr><td>$ergebnis[Beschreibung]</td></tr><br />";
                                                                  ^^^^^^
              echo "\n<tr><td> </td><td> </td></tr>";
              }
              echo "\n</table>";
              ?>

              Den "Wurm" habe ich Dir markiert.

              Kiska

              Danke dir! Ich sage mir eigentlich selber immer, das es in solchen Fällen nur an der Syntax hängen kann, aber ich und ein Kumpel haben den Fehler partou nicht gefunden. ;-)

              cya
              Johannes