Durch Link->Informations Seite öffnen

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

  • #16
    ist ja auch klar,
    deine funktion "weiß" ja nicht welchen user sie ausgeben soll
    Mess with the Besth, die like the rest!

    Kommentar


    • #17
      dann müsste ich doch $row['eventID'] als paramter angeben oder?

      PHP-Code:
      function showEventInDetails($row['eventID']); 
      So in etwa?

      Vielen Dank schonmal...

      Kommentar


      • #18
        und in der funktion wieder übernehmen ...
        Mess with the Besth, die like the rest!

        Kommentar


        • #19
          Was meinst du mit übernehmen, wenn ich das ganze mit function showEventInDetails($row['eventID']); mache kommt ne Fehlermeldung...

          PHP-Code:
              function showEvents() {
                  global 
          $db$row;
                  
          $max 2// Anzahl der Ausgaben pro Zeile
                  
          $i 1;
                  
          $result $db->query("SELECT * FROM ddb_events");
                  while(
          $row $db->fetch_array($result)) {
                      if (
          $i == 1)
                      echo 
          '<tr>';
                      echo 
          "<td style='background-color: #eee'>
                          <a href='partyplaner.php?show_id=
          $row[eventID]'>".$row['name']."</a></td>";

                      if (
          $i == $max) {
                      echo 
          '</tr>';
                      
          $i 1;
                      } else 
          $i++;
                     }       
               }


              function 
          showEventInDetails($row['eventID']) {
                  global 
          $db$row;
                  
          $qry $db->query("SELECT * FROM ddb_events WHERE eventID ==".$row['eventID']);
                  while(
          $row $db->fetch_array($qry)) {
                  echo 
          $row['name'];
                  }       
               }


              
              echo 
          "<table width='500px' align='center' cellpadding='1' cellspacing='1' style='background-color:#000;'>";
              
          showEvents();
              
              if ((isset(
          $row['eventID'])) && ($row['eventID'] != "")) {

                          
          showEventsInDetail();
                      }
              echo 
          "</table>";
              
                  if (isset(
          $_GET['show_id'])) {
                  
          showEventsInDetail();
                  } 
          Ps.: Das ganze soll nicht gleich darunter angezeigt werden sondern auf einer neuen Seite.

          Kommentar


          • #20
            naja -.-
            also deine datei heißt partyplaner.php ? das ist schon mal Vorraussetzung!
            in deiner mySQL gibt es die Felder name und eventID!
            lass doch den mist mit den funktionen weg, dann sieht das so aus:
            un jetzt guck bitte selber nochmal ein bisschen, und wenn du wirklich alles in funktionen packen willst, dann lies dir das manual zu diesem thema durch
            PHP-Code:
            global $db$row;

            if (isset( 
            $_GET['show_id'] )) {
              
            $qry $db->query("SELECT * FROM ddb_events WHERE eventID ==".$_GET['show_id']);
              while(
            $row $db->fetch_array($qry)) {
                echo 
            "Details:".$row['name'];
              }
            }
            else {
              echo 
            "<table width='500px' align='center' cellpadding='1' cellspacing='1' style='background-color:#000;'>";
              
            $max 2// Anzahl der Ausgaben pro Zeile
              
            $i 1;
              
            $result $db->query("SELECT * FROM ddb_events");
              while(
            $row $db->fetch_array($result)) {
                echo 
            '<tr>';
                echo 
            "<td style='background-color: #eee'>
                <a href='partyplaner.php?show_id="
            .$row['eventID']."'>".$row['name']."</a></td>";
                if (
            $i == $max) {
                  echo 
            '</tr>';
                  
            $i 1;
                }
                else {
                  
            $i++;
                }
              }
              echo 
            "</table>";

            Mess with the Besth, die like the rest!

            Kommentar


            • #21
              Ja also danke dir schonmal, aber ich habs schon gelöst und das sogar mit functionen . Ich kann dir jetzt net genau zeigen wie ich das gemacht habe da ich nicht zuhause bin.

              Kommentar

              Lädt...
              X