Forum Moderators: coopster
The field value that will be pass to another page is retrieved from table and the value could be an HTML code.
But instead of just storing the value to the field (and just display only the button), it display the HTML output.
How can I solve this?
echo '<input type="hidden" name="html" value="'. htmlentities($html, ENT_QUOTES) .'" />';
echo '<form action="anotherpage.php" method="post">';
echo '<INPUT type="hidden" name="field1" value="'.htmlentities($row[0], ENT_QUOTES).'">';
echo '<INPUT type="hidden" name="field2" value="'.htmlentities($row[1], ENT_QUOTES).'">';
echo '</form>';
That code should do the trick. On your next PHP script, you might need to run html_entity_decode on the $_POST['field1'] and $_POST['field2'] values.