WCM - Das österreichische Computer Magazin Forenübersicht
 

Zurück   WCM Forum > Rat & Tat > Programmierung

Programmierung Rat & Tat für Programmierer

Microsoft KARRIERECAMPUS

Antwort
 
Themen-Optionen Ansicht
Alt 22.07.2006, 19:01   #1
athropos
Hero
 
Registriert seit: 24.07.2001
Alter: 46
Beiträge: 801


athropos eine Nachricht über Skype™ schicken
Standard Formatierung aus SQL-Feld übernehmen

Hi!

Nun stellt sich mir folgendes Problem.

Über ein Formular mit Textarea spiele ich einen Text in eine SQL DB (auch dort Feldformat TEXT).

Gebe ich den Text "formatiert" (also mit Leerzeilen) ein, wird er auch formatiert in der SQL-DB gespeichert.

Wenn ich nun den Inhalt des Feldes (in php) auslese und wieder anzeigen will, ist die Formatierung verschwunden. Kann ich das irgendwie verhindern?

thx & lg,

Athropos
____________________________________
Einstein, Pascal and Newton are playing hide and seek. Einstein is \"it\" so he faces the wall, closes his eyes and counts to π.
Pascal runs off like an idiot but Newton pulls out a piece of chalk and draws a 1m x 1m square on the ground and then stands in it\'s centre.

Einstein\'s done counting and turns around and sees Newton, so he grabs him and screams \"I found Newton!\"

Then Newton smirks and says, \"I\'m not Newton, I\'m Pascal\".
athropos ist offline   Mit Zitat antworten
Alt 22.07.2006, 19:57   #2
athropos
Hero
 
Registriert seit: 24.07.2001
Alter: 46
Beiträge: 801


athropos eine Nachricht über Skype™ schicken
Standard

oki, hab selbst eine Lösung gefunden.

php stellt netterweise die Funktion nl2br zu Verfügung, damit kann man die Einträge schon vor dem Speichern in die richtige Form bringen.
____________________________________
Einstein, Pascal and Newton are playing hide and seek. Einstein is \"it\" so he faces the wall, closes his eyes and counts to π.
Pascal runs off like an idiot but Newton pulls out a piece of chalk and draws a 1m x 1m square on the ground and then stands in it\'s centre.

Einstein\'s done counting and turns around and sees Newton, so he grabs him and screams \"I found Newton!\"

Then Newton smirks and says, \"I\'m not Newton, I\'m Pascal\".
athropos ist offline   Mit Zitat antworten
Antwort


Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)
 

Forumregeln
Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.

Gehe zu


Alle Zeitangaben in WEZ +2. Es ist jetzt 23:43 Uhr.


Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Forum SEO by Zoints
© 2009 FSL Verlag