PSD-Tutorials.de
Forum für Design, Fotografie & Bildbearbeitung
Tutkit
Agentur
Hilfe
Kontakt
Start
Forum
Aktuelles
Besonderer Inhalt
Foren durchsuchen
Tutorials
News
Anmelden
Kostenlos registrieren
Aktuelles
Suche
Suche
Nur Titel durchsuchen
Von:
Menü
Anmelden
Kostenlos registrieren
App installieren
Installieren
JavaScript ist deaktiviert. Für eine bessere Darstellung aktiviere bitte JavaScript in deinem Browser, bevor du fortfährst.
Du verwendest einen veralteten Browser. Es ist möglich, dass diese oder andere Websites nicht korrekt angezeigt werden.
Du solltest ein Upgrade durchführen oder einen
alternativen Browser
verwenden.
Antworten auf deine Fragen:
Neues Thema erstellen
Start
Forum
Sonstiges
Webdesign, Webentwicklung & Programmierung
PHP, Javascript, jQuery, Ajax, nodeJS, MySQL...
PHP Parse Error in der letzten Zeile
Beitrag
<blockquote data-quote="SGLog" data-source="post: 835027"><p><strong>AW: PHP Parse Error in der letzten Zeile</strong></p><p></p><p>Hi, ich bin mir zwar nicht sicher ob das script so ausgefürt wird wie du es dir Vorstellst aber so ist deine Fehler Meldung behoben.</p><p></p><p>[php]</p><p><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"></p><p><html xmlns="http://www.w3.org/1999/xhtml"></p><p><head></p><p><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /></p><p></p><p><title>Ergebnisse</title></p><p></p><p></head></p><p><body></p><p><?php</p><p></p><p>include('config.php');</p><p></p><p>if(!isset($abfrage))</p><p>{</p><p>$realm = $_POST["realm"];</p><p>$addspecial = $_POST["add_special"];</p><p>$equip = $_POST["equip"];</p><p>$weapon_kind = $_POST["weapon_kind"];</p><p>$weapon_hand = $_POST["weapon_hand"];</p><p>$armor_kind = $_POST["armor_kind"];</p><p>$armor_place = $_POST["armor_place"];</p><p>$special = $_POST["special"];</p><p>$epic_class = $_POST["epic_class"];</p><p>}</p><p></p><p></p><p>if($realm!="all" and $addspecial=="yes")</p><p>{</p><p> $abfrage = "SELECT * FROM ids WHERE realm ='no' OR realm = '$realm'";</p><p>}</p><p>else</p><p>{</p><p> $abfrage = "SELECT * FROM ids WHERE realm ='$realm'";</p><p>}</p><p></p><p>if($equip != "all")</p><p>{</p><p> $abfrage .= "AND equip = '$equip'";</p><p>}</p><p></p><p>if($weapon_kind != "all")</p><p>{</p><p> $abfrage .= "AND weapon_kind = '$weapon_kind'";</p><p>}</p><p></p><p>if($weapon_hand != "all")</p><p>{</p><p> $abfrage .= "AND weapon_hand = '$weapon_hand'";</p><p>}</p><p></p><p>if($armor_kind != "all")</p><p>{</p><p> $abfrage .= "AND armor_kind = '$armor_kind'";</p><p>}</p><p></p><p>if($armor_place != "all")</p><p>{</p><p> $abfrage .= "AND armor_place = '$armor_place'";</p><p>}</p><p></p><p>if($special != "all")</p><p>{</p><p> $abfrage .= "AND special = '$special'";</p><p>}</p><p></p><p>if($epic_class != "all")</p><p>{</p><p>$abfrage .= "AND epic_class = '$epic_class'";</p><p>}</p><p></p><p>$ergebnis = mysql_query($abfrage);</p><p>$anzahl_ergebnisse = mysql_num_rows($ergebnis);</p><p>?></p><p></p><p><div name="anzahl"></p><p><p></p><p>Es wurden</p><p><?php echo $anzahl_ergebnisse; ?></p><p>Ausrüstungsgegenstände gefunden.</p><p></p></p><p></div></p><p></p><p><div name="ergebnisse"></p><p><table></p><p><tr></p><p><td>ID</td></p><p><td>Name</td></p><p><td>Realm</td></p><p><td>Equip</td></p><p><td>Weapon_kind</td></p><p><td>Weapon_hand</td></p><p><td>Armor_kind</td></p><p><td>Armor_place</td></p><p><td>Special</td></p><p><td>Epic_class</td></p><p></tr></p><p><?php</p><p></p><p>while($row = mysql_fetch_object($ergebnis))</p><p> {</p><p> echo "<tr>";</p><p> echo "<td>" . $row ->id . "</td>";</p><p> echo "<td>" . $row ->name . "</td>";</p><p> echo "<td>" . $row ->realm . "</td>";</p><p> echo "<td>" . $row ->equip . "</td>";</p><p> echo "<td>" . $row ->weapon_kind . "</td>";</p><p> echo "<td>" . $row ->weapon_hand . "</td>";</p><p> echo "<td>" . $row ->armor_kind . "</td>";</p><p> echo "<td>" . $row ->armor_place . "</td>";</p><p> echo "<td>" . $row ->special . "</td>";</p><p> echo "<td>" . $row ->epic_class . "</td>";</p><p> echo "<tr>";</p><p> }</p><p>?></p><p></p><p></table></p><p></div></p><p></p><p></body></p><p></html></p><p>[/php]Und hier das Script wie es die Vorgänger erklärt haben.</p><p></p><p>[php]</p><p><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"></p><p><html xmlns="http://www.w3.org/1999/xhtml"></p><p><head></p><p><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /></p><p></p><p><title>Ergebnisse</title></p><p></p><p></head></p><p><body></p><p><?php</p><p>include('config.php');</p><p>if(!isset($abfrage))</p><p>{</p><p>$realm = $_POST["realm"];</p><p>$addspecial = $_POST["add_special"];</p><p>$equip = $_POST["equip"];</p><p>$weapon_kind = $_POST["weapon_kind"];</p><p>$weapon_hand = $_POST["weapon_hand"];</p><p>$armor_kind = $_POST["armor_kind"];</p><p>$armor_place = $_POST["armor_place"];</p><p>$special = $_POST["special"];</p><p>$epic_class = $_POST["epic_class"];</p><p>if($realm!="all") if($addspecial=="yes")$abfrage = "SELECT * FROM ids WHERE realm ='no' OR realm = '$realm'";</p><p>}</p><p>else{$abfrage = "SELECT * FROM ids WHERE realm ='$realm'";</p><p>if($equip != "all") $abfrage .= "AND equip = '$equip'";</p><p>if($weapon_kind != "all") $abfrage .= "AND weapon_kind = '$weapon_kind'";</p><p>if($weapon_hand != "all") $abfrage .= "AND weapon_hand = '$weapon_hand'";</p><p>if($armor_kind != "all") $abfrage .= "AND armor_kind = '$armor_kind'";</p><p>if($armor_place != "all") $abfrage .= "AND armor_place = '$armor_place'";</p><p>if($special != "all") $abfrage .= "AND special = '$special'";</p><p>if($epic_class != "all") $abfrage .= "AND epic_class = '$epic_class'";</p><p>}</p><p>$ergebnis = mysql_query($abfrage);</p><p>$anzahl_ergebnisse = mysql_num_rows($ergebnis);</p><p>?></p><p></p><p><div name="anzahl"></p><p><p></p><p>Es wurden</p><p><?php echo $anzahl_ergebnisse; ?></p><p>Ausrüstungsgegenstände gefunden.</p><p></p></p><p></div></p><p></p><p><div name="ergebnisse"></p><p><table></p><p><tr></p><p><td>ID</td></p><p><td>Name</td></p><p><td>Realm</td></p><p><td>Equip</td></p><p><td>Weapon_kind</td></p><p><td>Weapon_hand</td></p><p><td>Armor_kind</td></p><p><td>Armor_place</td></p><p><td>Special</td></p><p><td>Epic_class</td></p><p></tr></p><p><?php</p><p>while($row = mysql_fetch_object($ergebnis))</p><p>{echo "<tr>";</p><p>echo "<td>" . $row ->id . "</td>";</p><p>echo "<td>" . $row ->name . "</td>";</p><p>echo "<td>" . $row ->realm . "</td>";</p><p>echo "<td>" . $row ->equip . "</td>";</p><p>echo "<td>" . $row ->weapon_kind . "</td>";</p><p>echo "<td>" . $row ->weapon_hand . "</td>";</p><p>echo "<td>" . $row ->armor_kind . "</td>";</p><p>echo "<td>" . $row ->armor_place . "</td>";</p><p>echo "<td>" . $row ->special . "</td>";</p><p>echo "<td>" . $row ->epic_class . "</td>";</p><p>echo "<tr>";}?></p><p></table></p><p></div></p><p></p><p></body></p><p></html></p><p>[/php]</p><p></p><p></p><p><strong>Das 2te ist auch Ohne Fehler und so wie du es Wolltest von der Ausführung her.</strong></p><p><strong>Das 1te ist da Übersichtlicher Gestalltet, ich hoffe du weist jetzt wo der Fehler war.</strong></p></blockquote><p></p>
[QUOTE="SGLog, post: 835027"] [b]AW: PHP Parse Error in der letzten Zeile[/b] Hi, ich bin mir zwar nicht sicher ob das script so ausgefürt wird wie du es dir Vorstellst aber so ist deine Fehler Meldung behoben. [php] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Ergebnisse</title> </head> <body> <?php include('config.php'); if(!isset($abfrage)) { $realm = $_POST["realm"]; $addspecial = $_POST["add_special"]; $equip = $_POST["equip"]; $weapon_kind = $_POST["weapon_kind"]; $weapon_hand = $_POST["weapon_hand"]; $armor_kind = $_POST["armor_kind"]; $armor_place = $_POST["armor_place"]; $special = $_POST["special"]; $epic_class = $_POST["epic_class"]; } if($realm!="all" and $addspecial=="yes") { $abfrage = "SELECT * FROM ids WHERE realm ='no' OR realm = '$realm'"; } else { $abfrage = "SELECT * FROM ids WHERE realm ='$realm'"; } if($equip != "all") { $abfrage .= "AND equip = '$equip'"; } if($weapon_kind != "all") { $abfrage .= "AND weapon_kind = '$weapon_kind'"; } if($weapon_hand != "all") { $abfrage .= "AND weapon_hand = '$weapon_hand'"; } if($armor_kind != "all") { $abfrage .= "AND armor_kind = '$armor_kind'"; } if($armor_place != "all") { $abfrage .= "AND armor_place = '$armor_place'"; } if($special != "all") { $abfrage .= "AND special = '$special'"; } if($epic_class != "all") { $abfrage .= "AND epic_class = '$epic_class'"; } $ergebnis = mysql_query($abfrage); $anzahl_ergebnisse = mysql_num_rows($ergebnis); ?> <div name="anzahl"> <p> Es wurden <?php echo $anzahl_ergebnisse; ?> Ausrüstungsgegenstände gefunden. </p> </div> <div name="ergebnisse"> <table> <tr> <td>ID</td> <td>Name</td> <td>Realm</td> <td>Equip</td> <td>Weapon_kind</td> <td>Weapon_hand</td> <td>Armor_kind</td> <td>Armor_place</td> <td>Special</td> <td>Epic_class</td> </tr> <?php while($row = mysql_fetch_object($ergebnis)) { echo "<tr>"; echo "<td>" . $row ->id . "</td>"; echo "<td>" . $row ->name . "</td>"; echo "<td>" . $row ->realm . "</td>"; echo "<td>" . $row ->equip . "</td>"; echo "<td>" . $row ->weapon_kind . "</td>"; echo "<td>" . $row ->weapon_hand . "</td>"; echo "<td>" . $row ->armor_kind . "</td>"; echo "<td>" . $row ->armor_place . "</td>"; echo "<td>" . $row ->special . "</td>"; echo "<td>" . $row ->epic_class . "</td>"; echo "<tr>"; } ?> </table> </div> </body> </html> [/php]Und hier das Script wie es die Vorgänger erklärt haben. [php] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Ergebnisse</title> </head> <body> <?php include('config.php'); if(!isset($abfrage)) { $realm = $_POST["realm"]; $addspecial = $_POST["add_special"]; $equip = $_POST["equip"]; $weapon_kind = $_POST["weapon_kind"]; $weapon_hand = $_POST["weapon_hand"]; $armor_kind = $_POST["armor_kind"]; $armor_place = $_POST["armor_place"]; $special = $_POST["special"]; $epic_class = $_POST["epic_class"]; if($realm!="all") if($addspecial=="yes")$abfrage = "SELECT * FROM ids WHERE realm ='no' OR realm = '$realm'"; } else{$abfrage = "SELECT * FROM ids WHERE realm ='$realm'"; if($equip != "all") $abfrage .= "AND equip = '$equip'"; if($weapon_kind != "all") $abfrage .= "AND weapon_kind = '$weapon_kind'"; if($weapon_hand != "all") $abfrage .= "AND weapon_hand = '$weapon_hand'"; if($armor_kind != "all") $abfrage .= "AND armor_kind = '$armor_kind'"; if($armor_place != "all") $abfrage .= "AND armor_place = '$armor_place'"; if($special != "all") $abfrage .= "AND special = '$special'"; if($epic_class != "all") $abfrage .= "AND epic_class = '$epic_class'"; } $ergebnis = mysql_query($abfrage); $anzahl_ergebnisse = mysql_num_rows($ergebnis); ?> <div name="anzahl"> <p> Es wurden <?php echo $anzahl_ergebnisse; ?> Ausrüstungsgegenstände gefunden. </p> </div> <div name="ergebnisse"> <table> <tr> <td>ID</td> <td>Name</td> <td>Realm</td> <td>Equip</td> <td>Weapon_kind</td> <td>Weapon_hand</td> <td>Armor_kind</td> <td>Armor_place</td> <td>Special</td> <td>Epic_class</td> </tr> <?php while($row = mysql_fetch_object($ergebnis)) {echo "<tr>"; echo "<td>" . $row ->id . "</td>"; echo "<td>" . $row ->name . "</td>"; echo "<td>" . $row ->realm . "</td>"; echo "<td>" . $row ->equip . "</td>"; echo "<td>" . $row ->weapon_kind . "</td>"; echo "<td>" . $row ->weapon_hand . "</td>"; echo "<td>" . $row ->armor_kind . "</td>"; echo "<td>" . $row ->armor_place . "</td>"; echo "<td>" . $row ->special . "</td>"; echo "<td>" . $row ->epic_class . "</td>"; echo "<tr>";}?> </table> </div> </body> </html> [/php] [B]Das 2te ist auch Ohne Fehler und so wie du es Wolltest von der Ausführung her. Das 1te ist da Übersichtlicher Gestalltet, ich hoffe du weist jetzt wo der Fehler war.[/B] [/QUOTE]
Bilder bitte
hier hochladen
und danach über das Bild-Icon (Direktlink vorher kopieren) platzieren.
Zitate einfügen…
Authentifizierung
Wenn ▲ = 7, ▼ = 3, ◇ = 2 und die Summe von ▲ und ▼ durch ◇ geteilt wird, was ist das Ergebnis?
Antworten
Start
Forum
Sonstiges
Webdesign, Webentwicklung & Programmierung
PHP, Javascript, jQuery, Ajax, nodeJS, MySQL...
PHP Parse Error in der letzten Zeile
Oben