noch ein PHP-Problem

Dieses Thema im Forum "Webentwicklung" wurde erstellt von MolchMaster, 21. Mai 2006 .

Schlagworte:
Status des Themas:
Es sind keine weiteren Antworten möglich.
  1. 21. Mai 2006
    Also, ich wollte mal testen, wie das mit diesen PHP-URL's funktioniert ( blub.php?seite=1)

    Ich habe in der Datei "links.php" volgenden Code:

    PHP:
    < html >
    <
    head >
    <
    title > Daten via URL </ title >
    </
    head >
    <
    body >
    <
    a href = "themen.php?thema=1" > Sport </ a >
    <
    a href = "themen.php?thema=2" > Autos </ a >
    <
    a href = "themen.php?thema=3" > Filme </ a >
    <
    a href = "themen.php?thema=4" > Computer </ a >
    </
    body >
    </
    html >
    hä, warum sind da <?php... eingefügt? das steht hier eigendlich nicht drinn... ?(


    und in der Datei themen.php den hier:

    PHP:
    <html>
    <head>
    <title>Gewählt</title>
    </head>
    <body>
    Sie haben folgendes Thema gewählt:
    <?php
    switch ( $thema ) {
        case 
    1 : echo  "Sport" ; break;
        case 
    2 : echo  "Autos" ; break;
        case 
    3 : echo  "Filme" ; break;
        case 
    4 : echo  "Computer" ; break;
    }
    ?>
    </body>
    </html>
    Wenn ich in der Themen.php auf einen Link klicke, kommt nur:

    Aber da kommt nichts von Auto, Computer, etc...
     
  2. 21. Mai 2006
    Mach mal aus dem

    PHP:
    switch( $thema )
    ein

    PHP:
    switch( $_GET [ 'thema' ])
    jetzt muesste es gehen
     
  3. 21. Mai 2006
    Ach mann, ist das alles kompiziert

    naja, danke 10er haste bekommen

    -=Closed=-
     
  4. Video Script

    Videos zum Themenbereich

    * gefundene Videos auf YouTube, anhand der Überschrift.