Reputation: 35
How do you a class id into an input field?
<input type="text" name="loc" value="<p id='test'>bb</p>" />
The example above doesn't work properly. Also, how do I put a PHP echo command in it.
Upvotes: 0
Views: 75
Reputation: 219814
Use htmlentities()
<input type="text" name="loc" value="<?php echo htmlentities("<p id='test'>bb</p>"); ?>" />
The output will look like this:
<input type="text" name="loc" value="<p id='test'>bb</p>" />
Upvotes: 1