Wo ist der Fehler!!??

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

  • Wo ist der Fehler!!??

    hallo...

    Hab ein Problem.

    Erstmal der Code:

    PHP-Code:
    If ($_GET['goto'] == "Home")
                                
                                            echo 
    "Hier kommt ein Text";
                                  


       If (
    $_GET['goto'] == "Bilder")

               
    $i=0;
                while (
    $i $zeilen)
                        {
                              
    $i=$i+1;
                              Echo 
    ' <table width="353" border="0" cellspacing="2"cellpadding="0" height="93">
    <tr height="15">
    <td width="150" height="15"></td>
    <td width="10" height="15"></td>
    <td align="left" width="50" height="15"></td>
    <td width="2" height="15"></td>
    <td width="120" height="15"></td>
    </tr>
    <tr height="15">
    <td rowspan="5" width="150" height="120"><img src="hp-pics/illog-klein.jpg" alt="" height="120" width="150" border="0"></td>
    <td width="10" height="15"></td>
    <td align="left" width="50" height="15"><font color="#6f7b94">Name </font></td>
    <td width="2" height="15"><font color="#6f7b94">:</font></td>
    <td width="120" height="15"><font color="#6f7b94">Illogical lab</font></td>
    </tr>
    <tr height="15">
    <td width="10" height="15"></td>
    <td width="50" height="15"><font color="#6f7b94">Designer</font></td>
    <td width="2" height="15"><font color="#6f7b94">:</font></td>
    <td width="120" height="15"><font color="#6f7b94">Nicht bekannt</font></td>
    </tr>
    <tr height="15">
    <td width="10" height="15"></td>
    <td align="left" width="50" height="15"><font color="#6f7b94">Aufl&ouml;sung</font></td>
    <td width="2" height="15"><font color="#6f7b94">:</font></td>
    <td width="120" height="15"><font color="#6f7b94">1280 x 1024</font></tr>
    </tr>
    <tr height="15">
    <td width="10" height="15"></td>
    <td align="left" width="50" height="15"><font color="#6f7b94">Gr&ouml;sse</font></td>
    <td width="2" height="15"><font color="#6f7b94">:</font></td>
    <td width="120" height="15"><font color="#6f7b94">221kb</font></td>
    </tr>
    <tr height="52">
    <td width="10" height="52"></td>
    <td align="left" width="50" height="52">Download</td>
    <td width="2" height="52"></td>
    <td width="120" height="52">Show</td>
    </tr>
    <tr height="15">
    <td width="150" height="15"></td>
    <td width="10" height="15"></td>
    <td align="left" width="50" height="15"></td>
    <td width="2" height="15"></td>
    <td width="120" height="15"></td>
    </tr>
    </table>'
    ;
    }
                  
    ?> 
    Ziel soll sein das wenn $_GET['goto'] == "Home") nur "Hier kommt ein text" anzeigt wird und wenn $_GET['goto'] == "Bilder") die ensprechenden Tabellen!

    Allerdings wenn $_GET['goto'] == "Home") werden AUCH die Tabellen mit angezeigt....was nicht sein soll!

    Wo mache ich einen Fehler??

    Danke für eure Hilfe!!
    .:::CoreX:::.

    www.core-x.net

  • #2
    was als WHILE laufen soll, hast du in {} gepackt, aber nichts für deine GET bilder.... da ist sozusagen nur $i = ..... drin...
    INFO: Erst suchen, dann posten![color=red] | [/color]MANUAL(s): PHP | MySQL | HTML/JS/CSS[color=red] | [/color]NICE: GNOME Do | TESTS: Gästebuch[color=red] | [/color]IM: Jabber.org |


    Kommentar


    • #3
      öhmmmm...geht das auch auf deutsch??? *loolll*
      .:::CoreX:::.

      www.core-x.net

      Kommentar


      • #4
        Re: Wo ist der Fehler!!??

        auf Deutsch (bzw. PHP):
        PHP-Code:
        ...
           If (
        $_GET['goto'] == "Bilder")
        // fehlt hier nicht zufällig ein { ?
                   
        $i=0;
                    while (
        $i $zeilen)
                            {
                                  
        $i=$i+1;
                                  Echo 
        ' <table width="353" border="0" ...>';
        }
                      
        ?> 
        hopka.net!

        Kommentar


        • #5
          ja das hatte ich auch. Das Problem ist auch dann nur teils gelöst... dann wenn $_GET['goto'] == "Bilder" dann werde die Tabellen nicht angezeigt!
          .:::CoreX:::.

          www.core-x.net

          Kommentar


          • #6
            vergesst die } am ende nicht. die da schon ist, kommt von der while.
            INFO: Erst suchen, dann posten![color=red] | [/color]MANUAL(s): PHP | MySQL | HTML/JS/CSS[color=red] | [/color]NICE: GNOME Do | TESTS: Gästebuch[color=red] | [/color]IM: Jabber.org |


            Kommentar


            • #7
              Ist vorhanden...daran liegts net!
              .:::CoreX:::.

              www.core-x.net

              Kommentar


              • #8
                PHP-Code:
                   If ($_GET['goto'] == "Bilder")
                    {  
                           
                $i=0;
                            while (
                $i $zeilen)
                                    {
                                          
                $i=$i+1;
                                          Echo 
                ' <table width="353" border="0" cellspacing="2"cellpadding="0" height="93">[...]
                </table>'
                ;
                                    }

                so müsste das eigentlich funktionieren, weil wenn $_GET['goto'] = "Bilder" ist, dann wird alles was dahinter steht (also auch die Ausgabe der Tabellen) durchgeführt.

                Wenn nicht, dann tippe ich darauf, dass die Variable $zeilen nicht stimmt.
                hopka.net!

                Kommentar


                • #9
                  statt "$zeile" hab ich mal "4" eingetippt. Geht auch net.
                  Es ändert sich auch nix wenn ich über der WHILE-Anweisung ECHO"asdfgadf"; Eintippe. Der musste normal die Augebe machen.
                  Passiert aber nix!
                  .:::CoreX:::.

                  www.core-x.net

                  Kommentar


                  • #10
                    hab den Fehler gefunden nicht "Bilder"wird GOTO übergeben sondern "GalBilder" Also tippfehler.

                    Aber danke....
                    .:::CoreX:::.

                    www.core-x.net

                    Kommentar

                    Lädt...
                    X