note 68365 deleted from function.htmlentities by nlopess

From: Date: Tue, 25 Jul 2006 11:26:38 +0000
Subject: note 68365 deleted from function.htmlentities by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-115128@lists.php.net to get a copy of this message
Note Submitter: stefaano ---- important question: why does this script work in Firefox 1.5.0.4 and not in MS IE 6 ? <?php echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Demostration</title> </head> <body> <?php echo "<form action=\"".$_SERVER['PHP_SELF']."\"method=\"post\">" ?> <p> Insert text here... <input type="text" name="textWritten" size="20" /> <input type="submit" name="send" value="send" /> </p> </form> <p> <?php if(isset($_POST['send'])) echo "you wrote: ".htmlentities($_POST['textWritten'], ENT_QUOTES, "UTF-8"); ?> </p> </body> </html> in firefox the entities are ok while in explorer it seems the function htmlentities does not work!

« previous php.notes (#115128) next »