note 70272 added to function.htmlentities

From: Date: Mon, 09 Oct 2006 17:27:19 +0000
Subject: note 70272 added to function.htmlentities
Groups: php.notes 
Request: Send a blank email to php-notes+get-118321@lists.php.net to get a copy of this message
<?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?? ---- Server IP: 83.138.144.80 Probable Submitter: 81.6.241.223 ---- Manual Page -- http://www.php.net/manual/en/function.htmlentities.php Edit -- https://master.php.net/note/edit/70272 Del: integrated -- https://master.php.net/note/delete/70272/integrated Del: useless -- https://master.php.net/note/delete/70272/useless Del: bad code -- https://master.php.net/note/delete/70272/bad+code Del: spam -- https://master.php.net/note/delete/70272/spam Del: non-english -- https://master.php.net/note/delete/70272/non-english Del: in docs -- https://master.php.net/note/delete/70272/in+docs Del: other reasons-- https://master.php.net/note/delete/70272 Reject -- https://master.php.net/note/reject/70272 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#118321) next »