on your live server, you need to change your php.ini file to include the following lines:
Code:
; this should fix your immediate problem
; and is VERY GOOD PRACTICE in all cases anyway
magic_quotes_gpc = Off
; this one will have no affect on your current code
; and is usually not enabled anyway but it's good to make sure
magic_quotes_runtime = Off
Create the php.ini file if it doesn't exist in your site root.
----------------------
In your example above,
PHP Code:
<?php
$field1value = isset($_POST['field1value'])? $_POST['field1value'] : '';
echo html_entity_decode(strip_tags($field1value));
?>
are you trying to view HTML code "as code" (preventing it from being parsed by the browser)?
or the opposite?
what you're doing seems a little contradictory - you're removing all html tags, then decoding any htmlentities into their actual characters. so, if I input
Code:
<button>Button #1</button>
<Button #2>
I'd get "Button #1" as plain text, and "Button #2" as an actual <button>.
...unless that's what you intended to do
Bookmarks