note 70272 deleted from function.htmlentities by nlopess

From: Date: Sat, 30 Dec 2006 18:49:28 +0000
Subject: note 70272 deleted from function.htmlentities by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-121113@lists.php.net to get a copy of this message
Note Submitter: danster3k at hotmail dot com ---- <?php if (isset($_POST['action']) && $_POST['action'] == 'submitted') { $output =($_POST['myInput']); print htmlentities($output,ENT_QUOTES); } else { ?> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post"> <p>Enter e-mail Subject here: <input type="string" name="myInput"> <input type="submit" name="submit" value="Convert"></p> <input type="hidden" name="action" value="submitted" /> </form> <?php } ?> using this code i simply want the user to input for example "£100" and then hit submit and this will output "&pound;100" on the screen .. but for some reason it outputs £100 on the browser.. but in the view source it has &pound;100 .. any idea how i can get it to display &pound;100 on the page??

« previous php.notes (#121113) next »