RE: [PHP] Using stripslashes() adddslashes() and htmlspecialchars()

From: Date: Tue, 31 Oct 2000 11:18:47 +0000
Subject: RE: [PHP] Using stripslashes() adddslashes() and htmlspecialchars()
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-22906@lists.php.net to get a copy of this message
why not try this? $comment = stripslashes(addslashes(htmlspecialchars($comment))); but, why do you strip then add slashes in this sequence? -----Original Message----- From: Robby Whiteside [mailto:robby@thedatasource.net] Sent: Sunday, October 29, 2000 3:37 AM To: php-general Cc: php-general Subject: [PHP] Using stripslashes() adddslashes() and htmlspecialchars() Hi There, I am making a guestbook and I need help using stripslashes() adddslashes() and htmlspecialchars(). Can i use them all togother like this: <? $comments=stripslashes($comments); $comments.=addslashes($comments); $comments.=htmlspecialchars($comments); echo "$comments"; ?> Robby

« previous php.general (#22906) next »