Variable leer initialisieren: $ausgabe = ' ';
Statt echo "Ausgabe"; halt $ausgabe = "Ausgabe";
und dann am Ende die Variable ausgeben: echo $ausgabe;
Ich hoffe du kannst damit was anfangen.
Hier kann eine Notiz zum Merk-Eintrag hinzugefügt werden (optional)
Geschlossen |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | $ausgabe = ''; if (isset($_GET['id'])) { $id = $_GET['id']; $loeschen = "DELETE FROM ic1_referenzen WHERE id = '$id'"; $loesch = db_query($loeschen) or die("Error: $loeschen <br>".mysql_error()); if($loesch == true) { $ausgabe = "Eintrag gelöscht"; } else { $ausgabe = "Löschen fehlgeschlagen"; }} |
1 2 3 4 | <?php echo "Zeile mit PHP" ; ?> <br>Zeile mit HTML |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | <?php $abfrage = "SELECT name, bildurl, veroffentlichung, typ, seiteurl, leistung, dauer FROM ic1_referenzen" ; $ergebnis = db_query( $abfrage ); while ( $row = mysql_fetch_object( $ergebnis )) { echo " <table border= "0" width= "100%" > <tr> <td colspan= "3" style= "background-color:#000000; color:#000000;" > $row ->name</td> </tr> <tr> <td width= "50px" style= "vertical-align:top;" ><img src= "$row->bildurl" alt= "" border= "0" ></td> <td style= "vertical-align:top;" > <table border= "0" cellpadding= "0" cellspacing= "0" width= "100%" > <tr> <td colspan= "3" style= "background-color:#000000; color:#000000" height= "15px" ></td> </tr> <tr> <td>Veröffentlichung:</td> <td> $row ->veroffentlichung</td> </tr> <tr> <td>Site-Typ:</td> <td> $row ->typ</td> </tr> <tr> <td>URL:</td> <td> $row ->seiteurl</td> </tr> <tr> <td>Leistung:</td> <td> $row ->leistung</td> </tr> <tr> <td>Dauer</td> <td> $row ->dauer</td> </tr> </table> </td> </tr> </table> "; } ?> |
1 2 3 4 5 6 7 8 | $title = $allgAr['title'].' :: Impressum'; $hmenu = 'Impressum'; $design = new design ( $title , $hmenu ); $design->header(); und $design->footer(); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | body { background-image:url("Bilder/bg_body.jpg"); background-repeat:repeat-y; font-family:Arial, Helvetica, sans-serif; font-size:8pt; color:#ffffff; margin-top:0px; margin-left:0px; } a:link { text-decoration: none; font-size:12px; color: #6e6e6e; } a:visited { text-decoration: none; font-size:12px; color: #6e6e6e; } a:hover { text-decoration: none; font-size:12px; color: #ffffff; background-color:#a6bb39; height:16px; } a:active { text-decoration: none; font-size:12px; color: #6e6e6e; } td.navi { background-image:url("Bilder/navi_bg.jpg"); color:#6e6e6e; font-size:10pt; width:699px; height:20px; padding-left:10px; word-spacing:30px; } td.main { vertical-align:top; color:#ffffff; font-size:10pt; background-image:url("Bilder/main_bg.jpg"); width:513px; } td.rechts { vertical-align:top; color:#ffffff; font-size:10pt; background-image:url("Bilder/rechts_bg.jpg"); width:186px; } td.footer { color:#f0f0f0; font-size:9pt; background-image:url("Bilder/footer.jpg"); width:699px; height:16px; padding-left:280px; } td.text { vertical-align:top; color:#ffffff; font-size:10pt; } td.text2 { vertical-align:top; color:#ffffff; font-size:10pt; padding-left:5px; } |
1 | <td colspan="2" style="font-size:xx-large;">{text}</td> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 | <?php $ausgabe = '' ; if (isset( $_GET [ 'id' ])) { $id = $_GET [ 'id' ]; $loeschen = "DELETE FROM ic1_referenzen WHERE id = '$id'" ; $loesch = db_query( $loeschen ) or die ( "Error: $loeschen <br>" .mysql_error()); if ( $loesch == true) { $ausgabe = "Eintrag gelöscht" ; } else { $ausgabe = "Löschen fehlgeschlagen" ; }} ?> <?php defined ( 'main' ) or die ( 'no direct access' ); defined ( 'admin' ) or die ( 'only admin access' ); $design = new design ( 'Admins Area' , 'Admins Area' , 2 ); $design ->header(); $name = $_POST [ "name" ]; $bildurl = $_POST [ "bildurl" ]; $veroffentlichung = $_POST [ "veroffentlichung" ]; $typ = $_POST [ "typ" ]; $seiteurl = $_POST [ "seiteurl" ]; $leistung = $_POST [ "leistung" ]; $dauer = $_POST [ "dauer" ]; if (isset( $_POST [ 'sub' ])) { $eintrag = "Insert into ic1_referenzen (name, bildurl, veroffentlichung, typ, seiteurl, leistung, dauer) values ('$name', '$bildurl' , '$veroffentlichung' , '$typ', '$seiteurl' , '$leistung' , '$dauer')" ; $eintragen = db_query( $eintrag ); if ( $eintragen == true) { echo "Speichern erfolgreich" ; } else { echo "Speichern fehlgeschlagen" ; } } ?> <br /><br /> <table cellpadding= "0" cellspacing= "0" border= "0" ><tr><td><img src= "include/images/icons/admin/imprint.png" /></td><td width= "30" ></td><td valign= "bottom" ><h1>Referenzen</h1></td></tr></table> <form action= "?referenzen" method= "POST" > <table border= "0" > <tr> <td>Name:</td> <td><input type= "text" name= "name" value= "" size= "60" ></td> </tr> <tr> <td>Bild-url:</td> <td><input type= "text" name= "bildurl" value= "" size= "60" ></td> </tr> <tr> <td>Seiten-url:</td> <td><input type= "text" name= "seiteurl" value= "---" size= "60" ></td> </tr> <td>Veröffentlichung:</td> <td><input type= "text" name= "veroffentlichung" value= "" size= "60" ></td> </tr> <tr> <td>Type:</td> <td> <select name= "typ" > <option>--Bitte wählen--</option> <option value= "Clan-Design" >Clan-Design</option> <option value= "Firmen-Design" >Firmen-Design</option> <option value= "Sonstiges" >Sonstiges</option> </select> </td> </tr> <tr> <td>Leistung:</td> <td> <select name= "leistung" > <option>--Bitte wählen--</option> <option value= "Design + Code" >Design + Code</option> <option value= "Design" >Design</option> <option value= "Code" >Code</option> </select> </td> </tr> <tr> <td>Dauer:</td> <td> <select name= "dauer" > <option>--Bitte wählen--</option> <option value= "1 Stunde" >1 Stunde</option> <option value= "2 Stunden" >2 Stunden</option> <option value= "3 Stunden" >3 Stunden</option> <option value= "4 Stunden" >4 Stunden</option> <option value= "5 Stunden" >5 Stunden</option> <option value= "6 Stunden" >6 Stunden</option> <option value= "7 Stunden" >7 Stunden</option> </select> </td> </tr> <tr> <td>Eintragen:</td> <td><input type= "submit" name= "sub" value= "Speichern" ></td> </tr> <table> </form> <br /><br /> ............................................................................................................................ <br /><br /> <?php $abfrage = "SELECT name,id FROM ic1_referenzen" ; $ergebnis = db_query( $abfrage ); echo "<table border=\"0\">" ; while ( $row = db_fetch_object( $ergebnis )) { echo " <tr> <td width=\"200\"> $row ->name</td> <td width=\"20\"><a href=\"admin.php?referenzen&id= $row ->id\"> <img src=\"http: //web164.server104.rhs-it.de/ilchClan11c/include/images/icons/loeschen.png\" border=\"0\" alt=\"Loeschen\"> </a></td> </tr>"; } echo "</table>" ; ?> <br /> <?php echo $ausgabe ; ?> <br /> <?php $design ->footer(); ?> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | <?php defined ( 'main' ) or die ( 'no direct access' ); $title = $allgAr [ 'title' ]. ' :: Impressum' ; $hmenu = 'Impressum' ; $design = new design ( $title , $hmenu ); $design ->header(); $abfrage = "SELECT name, bildurl, veroffentlichung, typ, seiteurl, leistung, dauer FROM ic1_referenzen" ; $ergebnis = db_query( $abfrage ); while ( $row = mysql_fetch_object( $ergebnis )) { echo " <table border=\"0\" width=\"100%\"> <tr> <td colspan=\"3\" style=\"background-color:#d3df9c; color:#777777; font-size:8pt;\"><b> $row ->name</b></td> </tr> <tr> <td width=\"50px\" style=\"vertical-align:top;\"><img src=\" $row ->bildurl\" alt=\"\" border=\"0\"></td> <td style=\"vertical-align:top;\"> <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"> <tr> <td colspan=\"3\" style=\"background-color:#c1d275; color:#000000\" height=\"15px\"></td> </tr> <tr> <td>Veröffentlichung:</td> <td> $row ->veroffentlichung</td> </tr> <tr> <td>Site-Typ:</td> <td> $row ->typ</td> </tr> <tr> <td>URL:</td> <td> $row ->seiteurl</td> </tr> <tr> <td>Leistung:</td> <td> $row ->leistung</td> </tr> <tr> <td>Dauer</td> <td> $row ->dauer</td> </tr> </table> </td> </tr> </table> "; } $design ->footer(); ?> |
1 2 3 4 | while() { echo "<tr><td>usw." } |
1 2 3 4 | while() { $tpl->set_ar_out(Werte); } |
Geschlossen | ||
![]() |
Zurück zu HTML, PHP, SQL,... |