Re: Reading posted form variables

From: Date: Wed, 16 Mar 2005 10:24:53 +0000
Subject: Re: Reading posted form variables
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-210884@lists.php.net to get a copy of this message
Simon Allison wrote:
Hey,
....
Obviously this has something to do with the quotation marks in the a href statement, however I am new to php and my attempts using addslashes and stripslashes have failed. I would be most grateful if anyone could help me.
addslashes() and stripslashes() won't help completely (although you may still need to escape quotes - depending on the way you call the following funcs...) - take a look at htmlentities() and htmlspecialchars(), basically you need to encode you 'msg' so that any HTML contained in the message is not rendered by the browser.
Cheers, Simon


« previous php.general (#210884) next »