Page 1 of 1

Use htmlentities or rawurlencode to add text to a form text

Posted: Fri Jul 23, 2004 2:33 pm
by WaldoMonster
Use htmlentities or rawurlencode to add text to a form text field.

Code: Select all

<input type="text" name="input" value="<?php echo htmlentities($default_text); ?>">
<input type="text" name="input" value="<?php echo rawurlencode ($default_text); ?>">
Both they seam to work.

<edit>
It must be htmlentities.
Sorry for posting :oops:
</edit>