mein heutiges problem ist eigentlich recht simpel. ich möchte, dass wenn jemand in mein guestbook sich einträgt, und er dabei die "enter"-taste drückte um einen zeilenumbruch zu machen, dieser von meinem GB erkannt wird und als "<br>" tag in meiner textdatei gespeichert wird.
zur erklärung:
die person die sich verewigen möchte gibt auf meiner site in mehrere textfelder ein paar sachen an (email, HP, name, etc..), auch den kommentar den er hinterlassen möchte. wenn jemand jetzt also in dieses textfeld folgendes eingibt:
"hallo!
Tolle site,
gefällt mir gut.
LG, xxx"
dann wird letztlich auf meiner site so angezeigt:
"hallo!Tolle site,gefällt mir gut.LG,xxx"
ergo: es werden die zeilenwechsel nicht erkannt. wie kann das meinem script klarmachen dass es sich bei einem zeilenwechsel um einen "<br>" tag handelt?
thanks,
[JLA]
--
The problem with America is stupidity.
I'm not saying there should be a capital punishment for stupidity, but why don't we just take the safety labels off of everything and let the problem solve itself?
----
Arguing with the moderators is like shaking your fist at God. There's nobody there; and if there is, he's not listening. And if he's listening, all you're doing is pissing him off.
Die wohl einfachste Methode wäre, den Teil, in den die Datei eingefügt wird mit CSS als "whitespace: pre;" auszuzeichnen, dann werden Zeilenumbrüche automatisch übernommen.
also die css variante fällt schon mal flach, mehr aus dem grund dass ich keine ahnung von css hab, als dass es nicht unterstützt wird
zu der 2ten variante. wo genau soll ich den befehl einfügen? an der stelle wo es eingelesen wird, oder wo es ausgegeben wird? zur info, hier ist mein script:
--
The problem with America is stupidity.
I'm not saying there should be a capital punishment for stupidity, but why don't we just take the safety labels off of everything and let the problem solve itself?
----
Arguing with the moderators is like shaking your fist at God. There's nobody there; and if there is, he's not listening. And if he's listening, all you're doing is pissing him off.
Ist eigentlich unwichtig, ob du die Funktion beim Schreiben oder beim Auslesen anwendest. Ich würde es beim Auslesen machen, aber du hast ja nur das Skript zum Schreiben gepostet. Man könnte es zum Beispiel am Anfang einbauen:
freundliche Grüße, Rolus
ein hoch auf den RPG-Kingdom. mal wieder alles in ordnung
thanks@all
--
The problem with America is stupidity.
I'm not saying there should be a capital punishment for stupidity, but why don't we just take the safety labels off of everything and let the problem solve itself?
----
Arguing with the moderators is like shaking your fist at God. There's nobody there; and if there is, he's not listening. And if he's listening, all you're doing is pissing him off.