There is a problem with my guestbook:
when I type in the textarea the following string:
s
s
s
s
s
(breaking lines pressing ENTER)
I get the following output on the mainpage : s s s s s s
What should I do ? I guess I didn't add enough code ))
Thank you
Problem with string
Moderator: General Moderators
Re: Problem with string
I think the first thing you should do is explain why you think we can tell you what's wrong with code that we have never seen.
- Ambush Commander
- DevNet Master
- Posts: 3698
- Joined: Mon Oct 25, 2004 9:29 pm
- Location: New Jersey, US
Re: Problem with string
use nl2br(htmlspecialchars($text)). Newlines in text don't translate to newlines in HTML, and chances are you've got an XSS vulnerability.
Re: Problem with string
thnx Ambush Commander, it worked !